[Mesa-dev] [PATCH 3/4] glsl ast_to_hir: Silence uninitialized variable warnings in the release build

Emil Velikov emil.l.velikov at gmail.com
Sat Jun 22 08:43:37 PDT 2013


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 at gmail.com>
---
 src/glsl/ast_to_hir.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index e918ade..a3d820f 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -4174,6 +4174,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!");
    }
 
-- 
1.8.3.1



More information about the mesa-dev mailing list