glsl: fix warning in release build
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 16 Apr 2016 01:00:11 +0000 (04:00 +0300)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 25 Apr 2016 10:23:16 +0000 (12:23 +0200)
Mark variable MAYBE_UNUSED to avoid unused-but-set-variable warning in
release build.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/compiler/glsl/lower_buffer_access.cpp

index f85b421cf270b480960635388bbb208e8ad1e068..59a2ae8c69e48db8724a957312f08331b3a474bf 100644 (file)
@@ -283,7 +283,7 @@ lower_buffer_access::is_dereferenced_thing_row_major(const ir_rvalue *deref)
              * layouts at HIR generation time, but we don't do that for shared
              * variables, which are always column-major
              */
-            ir_variable *var = deref->variable_referenced();
+            MAYBE_UNUSED ir_variable *var = deref->variable_referenced();
             assert((var->is_in_buffer_block() && !matrix) ||
                    var->data.mode == ir_var_shader_shared);
             return false;