glsl/ast: Silence uninitialized variable warnings in the release build
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 8 Jul 2013 17:29:17 +0000 (18:29 +0100)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 9 Jul 2013 02:08:30 +0000 (19:08 -0700)
Resolves the following gcc warnings

 warning: 'iface_type_name' may be used uninitialized in this function
 warning: 'var_mode' may be used uninitialized in this function

Note: The variables are initialised to UNKNOWN and ir_var_auto

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ast_to_hir.cpp

index cbd9ea35716eff283d22104860071625605f1d99..611a85dd8e1f9d8784acf8763c60cd53ea53bb17 100644 (file)
@@ -4229,6 +4229,8 @@ ast_interface_block::hir(exec_list *instructions,
       var_mode = ir_var_uniform;
       iface_type_name = "uniform";
    } else {
+      var_mode = ir_var_auto;
+      iface_type_name = "UNKNOWN";
       assert(!"interface block layout qualifier not found!");
    }