From 282f67becd072068147c95f26d9c705acf1bbe1b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 6 Mar 2015 21:52:31 -0800 Subject: [PATCH] i915: Fix GCC unused-but-set-variable warning in release build. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Anuj Phogat --- src/mesa/drivers/dri/i915/i915_fragprog.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index d42da5a6b61..9b002236add 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -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) -- 2.30.2