mesa/st: Silence uninitialized variable warning.
authorVinson Lee <vlee@vmware.com>
Thu, 16 Sep 2010 01:47:17 +0000 (18:47 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 16 Sep 2010 01:47:17 +0000 (18:47 -0700)
src/mesa/state_tracker/st_extensions.c

index 4c223f33742bc0f1d4dcb461fcaedb3186ea6fd3..4c18c66cc4d1d7a21ea60028027339cee1632019 100644 (file)
@@ -67,7 +67,6 @@ void st_init_limits(struct st_context *st)
 {
    struct pipe_screen *screen = st->pipe->screen;
    struct gl_constants *c = &st->ctx->Const;
-   struct gl_program_constants *pc;
    unsigned i;
 
    c->MaxTextureLevels
@@ -140,6 +139,7 @@ void st_init_limits(struct st_context *st)
 
    for(i = 0; i < MESA_SHADER_TYPES; ++i) {
       struct gl_shader_compiler_options *options = &st->ctx->ShaderCompilerOptions[i];
+      struct gl_program_constants *pc;
       switch(i)
       {
       case PIPE_SHADER_FRAGMENT:
@@ -151,6 +151,9 @@ void st_init_limits(struct st_context *st)
       case PIPE_SHADER_GEOMETRY:
          pc = &c->GeometryProgram;
          break;
+      default:
+         assert(0);
+         continue;
       }
 
       pc->MaxNativeInstructions    = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_INSTRUCTIONS);