[Mesa-dev] [PATCH 02/12] i830: Move assert-only code into the assert.

Eric Anholt eric at anholt.net
Thu Apr 11 11:06:29 PDT 2013


The call has no side effects, and moving it into the assert cleans up a
compile warning in the release build.
---
 src/mesa/drivers/dri/i915/i830_vtbl.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 6019852..b30f45e 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -179,8 +179,6 @@ i830_render_start(struct intel_context *intel)
        v2 != i830->state.Ctx[I830_CTXREG_VF2] ||
        mcsb1 != i830->state.Ctx[I830_CTXREG_MCSB1] ||
        index_bitset != i830->last_index_bitset) {
-      int k;
-
       I830_STATECHANGE(i830, I830_UPLOAD_CTX);
 
       /* Must do this *after* statechange, so as not to affect
@@ -199,8 +197,7 @@ i830_render_start(struct intel_context *intel)
       i830->state.Ctx[I830_CTXREG_MCSB1] = mcsb1;
       i830->last_index_bitset = index_bitset;
 
-      k = i830_check_vertex_size(intel, intel->vertex_size);
-      assert(k);
+      assert(i830_check_vertex_size(intel, intel->vertex_size));
    }
 }
 
-- 
1.7.10.4



More information about the mesa-dev mailing list