[Mesa-dev] [PATCH] nvc0: Remove unused pointer value cfg.
Vinson Lee
vlee at freedesktop.org
Sun Nov 3 15:06:27 PST 2013
cfg is only used inside for loop so also move declaration there.
Fixes "Unused pointer value" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
index 21aa358..4f83f57 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
@@ -1155,9 +1155,6 @@ nvc0_mp_pm_query_end(struct nvc0_context *nvc0, struct nvc0_query *q)
const uint block[3] = { 32, is_nve4 ? 4 : 1, 1 };
const uint grid[3] = { screen->mp_count, 1, 1 };
unsigned c;
- const struct nvc0_mp_pm_query_cfg *cfg;
-
- cfg = nvc0_mp_pm_query_get_cfg(nvc0, q);
if (unlikely(!screen->pm.prog)) {
struct nvc0_program *prog = CALLOC_STRUCT(nvc0_program);
@@ -1212,6 +1209,7 @@ nvc0_mp_pm_query_end(struct nvc0_context *nvc0, struct nvc0_query *q)
mask = 0;
for (c = 0; c < 8; ++c) {
unsigned i;
+ const struct nvc0_mp_pm_query_cfg *cfg;
q = nvc0_query(screen->pm.mp_counter[c]);
if (!q)
continue;
--
1.8.3.1
More information about the mesa-dev
mailing list