From a54ab4960b86839f73e7c16fdde00670a67ee80e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 28 Oct 2010 06:08:19 -0700 Subject: [PATCH] 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 --- src/mesa/state_tracker/st_program.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.30.2