OSDN Git Service

spirv: fix warning in release build
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 16 Apr 2016 01:00:13 +0000 (04:00 +0300)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 25 Apr 2016 10:23:25 +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: Emil Velikov <emil.velikov@collabora.com>
src/compiler/spirv/vtn_cfg.c

index 6a43ef8..d9096f4 100644 (file)
@@ -36,7 +36,7 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode,
       list_inithead(&b->func->body);
       b->func->control = w[3];
 
-      const struct glsl_type *result_type =
+      MAYBE_UNUSED const struct glsl_type *result_type =
          vtn_value(b, w[1], vtn_value_type_type)->type->type;
       struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_function);
       val->func = b->func;