From 483971e649946bd8d3399240de5b483be9bd3402 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 29 Sep 2010 11:19:55 -0700 Subject: [PATCH] r300/compiler: Move declaration before code. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } } -- 2.30.2