r300/compiler: Move declaration before code.
authorVinson Lee <vlee@vmware.com>
Wed, 29 Sep 2010 18:19:55 +0000 (11:19 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 29 Sep 2010 18:19:55 +0000 (11:19 -0700)
Fixes this GCC warning on linux-x86 build.
radeon_emulate_loops.c: In function ‘rc_emulate_loops’:
radeon_emulate_loops.c:517: warning: ISO C90 forbids mixed declarations and code

src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c

index 02a52f92fc321b9736731f3a937709d071dd712c..205eecd11298339a11d2ee1673717f6624964a6d 100644 (file)
@@ -511,11 +511,12 @@ void rc_emulate_loops(struct radeon_compiler *c, void *user)
         * loops are unrolled first.
         */
        for( i = s->LoopCount - 1; i >= 0; i-- ){
+               unsigned int iterations;
+
                if(!s->Loops[i].EndLoop){
                        continue;
                }
-               unsigned int iterations = loop_max_possible_iterations(
-                                       s->C, &s->Loops[i]);
+               iterations = loop_max_possible_iterations(s->C, &s->Loops[i]);
                unroll_loop(s->C, &s->Loops[i], iterations);
        }
 }