Mesa (mesa_7_4_branch): glsl: silence some uninit var warnings
Brian Paul
brianp at kemper.freedesktop.org
Tue Feb 17 23:40:14 UTC 2009
Module: Mesa
Branch: mesa_7_4_branch
Commit: dd312366daf4fd5398e8eea56518c7ed61e8dfbd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd312366daf4fd5398e8eea56518c7ed61e8dfbd
Author: Brian Paul <brianp at vmware.com>
Date: Tue Feb 17 16:38:30 2009 -0700
glsl: silence some uninit var warnings
(cherry picked from master, commit 9d49802b7a3a1e292965098da41c459fabf84cc4)
---
src/mesa/shader/slang/slang_codegen.c | 2 +-
src/mesa/shader/slang/slang_compile.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 11340d2..cfdb868 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -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.
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 818b90b..26a0598 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -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);
More information about the mesa-commit
mailing list