aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-10-28 06:08:19 -0700
committerVinson Lee <[email protected]>2010-10-28 06:08:19 -0700
commita54ab4960b86839f73e7c16fdde00670a67ee80e (patch)
treeb38edd079cb1bda65322679f5094142f9bd55986
parentaa43176ebd26227947b07221f4e475c52bd7a76b (diff)
st/mesa: Silence uninitialized variable warning.
Fixes this GCC warning. state_tracker/st_program.c: In function 'st_print_shaders': state_tracker/st_program.c:735: warning: 'sh' may be used uninitialized in this function
-rw-r--r--src/mesa/state_tracker/st_program.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 6a5d741b61b..76799287fe1 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -744,6 +744,10 @@ st_print_shaders(struct gl_context *ctx)
case GL_FRAGMENT_SHADER:
sh = (i != 2) ? NULL : shProg[j]->Shaders[i];
break;
+ default:
+ assert(0);
+ sh = NULL;
+ break;
}
if (sh != NULL) {