[Mesa-dev] [PATCH] glsl: add default switch case to silence uninitialized variable warning

Brian Paul brianp at vmware.com
Fri Aug 23 13:24:12 PDT 2013


---
 src/glsl/ast_to_hir.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index feff586..24efec6 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1933,6 +1933,9 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state,
       case fragment_shader:
          limit = ctx->Const.FragmentProgram.MaxTextureImageUnits;
          break;
+      default:
+         limit = 0;
+         assert(!"Unexpected shader type");
       }
 
       if (max_index >= limit) {
-- 
1.7.10.4



More information about the mesa-dev mailing list