From: Vinson Lee Date: Thu, 28 Oct 2010 13:08:19 +0000 (-0700) Subject: st/mesa: Silence uninitialized variable warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a54ab4960b86839f73e7c16fdde00670a67ee80e;p=mesa.git 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 --- 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) {