Mesa (master): i915: Fix GCC unused-variable warning in release build.

Vinson Lee vlee at kemper.freedesktop.org
Sat Mar 7 05:42:52 UTC 2015


Module: Mesa
Branch: master
Commit: 1ca39ec03cfba9c032f6e3b8b6c1f24e69bf96ac
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ca39ec03cfba9c032f6e3b8b6c1f24e69bf96ac

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Tue Mar  3 18:54:48 2015 -0800

i915: Fix GCC unused-variable warning in release build.

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 at freedesktop.org>
Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>

---

 src/mesa/drivers/dri/i915/i915_debug_fp.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_debug_fp.c b/src/mesa/drivers/dri/i915/i915_debug_fp.c
index 9b4bc76..3f09902 100644
--- a/src/mesa/drivers/dri/i915/i915_debug_fp.c
+++ b/src/mesa/drivers/dri/i915/i915_debug_fp.c
@@ -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) {




More information about the mesa-commit mailing list