glsl: silence some uninit var warnings
authorBrian Paul <brianp@vmware.com>
Mon, 16 Feb 2009 15:25:57 +0000 (08:25 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 16 Feb 2009 15:33:03 +0000 (08:33 -0700)
src/mesa/shader/slang/slang_codegen.c
src/mesa/shader/slang/slang_compile.c

index 11340d2..cfdb868 100644 (file)
@@ -3662,7 +3662,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper)
       if (lhs && rhs) {
          /* convert lhs swizzle into writemask */
          const GLuint swizzle = root_swizzle(lhs->Store);
-         GLuint writemask, newSwizzle;
+         GLuint writemask, newSwizzle = 0x0;
          if (!swizzle_to_writemask(A, swizzle, &writemask, &newSwizzle)) {
             /* Non-simple writemask, need to swizzle right hand side in
              * order to put components into the right place.
index cfed977..ab84857 100644 (file)
@@ -1450,7 +1450,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O,
       case OP_CALL:
          {
             GLboolean array_constructor = GL_FALSE;
-            GLint array_constructor_size;
+            GLint array_constructor_size = 0;
 
             op->type = SLANG_OPER_CALL;
             op->a_id = parse_identifier(C);