st/mesa: Silence uninitialized variable warning.
authorVinson Lee <vlee@vmware.com>
Thu, 28 Oct 2010 13:08:19 +0000 (06:08 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 28 Oct 2010 13:08:19 +0000 (06:08 -0700)
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

index 6a5d741b61b491e7cb2ec0d650236797b30967b0..76799287fe12dff9c69de2254f87eae223596f74 100644 (file)
@@ -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) {