diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2013-07-08 18:30:44 +0100 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-08 19:08:42 -0700 |
commit | f0260f4e3d939c93ec6ef3b6b330383fe9944d93 (patch) | |
tree | 3cd5b97f488e5b8a4ed3942ea309068ff46186e2 /src/glsl/opt_flip_matrices.cpp | |
parent | 4df6823f2147c17161c2cacc89d1a5c17a87aad3 (diff) |
glsl: Silence unused variable warning in the release build
Resolves the following gcc warning
opt_flip_matrices.cpp:84:32: warning: unused variable 'deref'
v2: keep the variable, but wrap it in a ifndef NDEBUG block
(suggested by Ian)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/opt_flip_matrices.cpp')
-rw-r--r-- | src/glsl/opt_flip_matrices.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/opt_flip_matrices.cpp b/src/glsl/opt_flip_matrices.cpp index 497513fe82..2107b1d474 100644 --- a/src/glsl/opt_flip_matrices.cpp +++ b/src/glsl/opt_flip_matrices.cpp @@ -81,8 +81,10 @@ matrix_flipper::visit_enter(ir_expression *ir) if (mvp_transpose && strcmp(mat_var->name, "gl_ModelViewProjectionMatrix") == 0) { +#ifndef NDEBUG ir_dereference_variable *deref = ir->operands[0]->as_dereference_variable(); assert(deref && deref->var == mat_var); +#endif void *mem_ctx = ralloc_parent(ir); |