i915: Fix GCC unused-but-set-variable warning in release build.
authorVinson Lee <vlee@freedesktop.org>
Sat, 7 Mar 2015 05:52:31 +0000 (21:52 -0800)
committerVinson Lee <vlee@freedesktop.org>
Tue, 10 Mar 2015 00:28:39 +0000 (17:28 -0700)
i915_fragprog.c: In function ‘i915ValidateFragmentProgram’:
i915_fragprog.c:1453:11: warning: variable ‘k’ set but not used [-Wunused-but-set-variable]
       int k;
           ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i915/i915_fragprog.c

index d42da5a6b61b2e0bafb4da9090a17afd2fc774ae..9b002236adda732e2759e1334bda62e3fcceea2a 100644 (file)
@@ -1450,8 +1450,6 @@ i915ValidateFragmentProgram(struct i915_context *i915)
 
    if (s2 != i915->state.Ctx[I915_CTXREG_LIS2] ||
        s4 != i915->state.Ctx[I915_CTXREG_LIS4]) {
-      int k;
-
       I915_STATECHANGE(i915, I915_UPLOAD_CTX);
 
       /* Must do this *after* statechange, so as not to affect
@@ -1471,8 +1469,7 @@ i915ValidateFragmentProgram(struct i915_context *i915)
       i915->state.Ctx[I915_CTXREG_LIS2] = s2;
       i915->state.Ctx[I915_CTXREG_LIS4] = s4;
 
-      k = intel->vtbl.check_vertex_size(intel, intel->vertex_size);
-      assert(k);
+      assert(intel->vtbl.check_vertex_size(intel, intel->vertex_size));
    }
 
    if (!p->params_uptodate)