[Mesa-dev] [PATCH 4/4] glsl opt_flip_matrices: Silence unused variable warning in the release build
Emil Velikov
emil.l.velikov at gmail.com
Sat Jun 22 08:43:38 PDT 2013
Resolves the following gcc warning
opt_flip_matrices.cpp:84:32: warning: unused variable 'deref'
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/glsl/opt_flip_matrices.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/glsl/opt_flip_matrices.cpp b/src/glsl/opt_flip_matrices.cpp
index 497513f..be3ccf8 100644
--- a/src/glsl/opt_flip_matrices.cpp
+++ b/src/glsl/opt_flip_matrices.cpp
@@ -81,8 +81,8 @@ matrix_flipper::visit_enter(ir_expression *ir)
if (mvp_transpose &&
strcmp(mat_var->name, "gl_ModelViewProjectionMatrix") == 0) {
- ir_dereference_variable *deref = ir->operands[0]->as_dereference_variable();
- assert(deref && deref->var == mat_var);
+ assert(ir->operands[0]->as_dereference_variable() &&
+ ir->operands[0]->as_dereference_variable()->var == mat_var);
void *mem_ctx = ralloc_parent(ir);
--
1.8.3.1
More information about the mesa-dev
mailing list