i915: Fix GCC unused-variable warning in release build.
authorVinson Lee <vlee@freedesktop.org>
Wed, 4 Mar 2015 02:54:48 +0000 (18:54 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 7 Mar 2015 05:41:46 +0000 (21:41 -0800)
i915_debug_fp.c: In function ‘i915_disassemble_program’:
i915_debug_fp.c:302:11: warning: unused variable ‘size’ [-Wunused-variable]
    GLuint size = program[0] & 0x1ff;
           ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
src/mesa/drivers/dri/i915/i915_debug_fp.c

index 9b4bc768f8ab69d9e19a99ed530f490c79a27674..3f0990226401c0d360edd85d8c118c68aeff5093 100644 (file)
@@ -299,12 +299,11 @@ print_dcl_op(GLuint opcode, const GLuint * program)
 void
 i915_disassemble_program(const GLuint * program, GLuint sz)
 {
-   GLuint size = program[0] & 0x1ff;
    GLint i;
 
    printf("\t\tBEGIN\n");
 
-   assert(size + 2 == sz);
+   assert(program[0] & 0x1ff + 2 == sz);
 
    program++;
    for (i = 1; i < sz; i += 3, program += 3) {