From: Vinson Lee Date: Wed, 29 Sep 2010 18:19:55 +0000 (-0700) Subject: r300/compiler: Move declaration before code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=483971e649946bd8d3399240de5b483be9bd3402;p=mesa.git r300/compiler: Move declaration before code. 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 --- diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c b/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c index 02a52f92fc3..205eecd1129 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.c @@ -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); } }