mesa: Fix compiler error.
authorMichal Krol <michal@tungstengraphics.com>
Fri, 19 Sep 2008 17:11:37 +0000 (19:11 +0200)
committerMichal Krol <michal@tungstengraphics.com>
Fri, 19 Sep 2008 17:11:37 +0000 (19:11 +0200)
src/mesa/shader/arbprogparse.c

index 5e81477592a9b162014338c6f626880778993224..466ae48bef35fecae78384c5eb964112e612799f 100644 (file)
@@ -2604,11 +2604,13 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
    }
 
    if (*File == PROGRAM_STATE_VAR) {
+      enum register_file file;
+
       /* If we're referencing the Program->Parameters[] array, check if the
        * parameter is really a constant/literal.  If so, set File to CONSTANT.
        */
       assert(*Index < Program->Base.Parameters->NumParameters);
-      enum register_file file = Program->Base.Parameters->Parameters[*Index].Type;
+      file = Program->Base.Parameters->Parameters[*Index].Type;
       if (file == PROGRAM_CONSTANT)
          *File = PROGRAM_CONSTANT;
    }