r300/compiler: Move declaration before code.
authorVinson Lee <vlee@vmware.com>
Thu, 25 Nov 2010 07:00:03 +0000 (23:00 -0800)
committerVinson Lee <vlee@vmware.com>
Thu, 25 Nov 2010 07:00:03 +0000 (23:00 -0800)
Fixes this GCC warning with linux-x86 build.
radeon_pair_regalloc.c: In function ‘compute_live_intervals’:
radeon_pair_regalloc.c:221: warning: ISO C90 forbids mixed declarations and code

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

index 3f880c88fa7f54b4d7da6e794567ba0abcd66233..3874c7e41898f64cd21199ae785368dce15fcade 100644 (file)
@@ -217,8 +217,8 @@ static void compute_live_intervals(struct radeon_compiler *c,
                 * instruction is used as the end of the live interval and
                 * the BGNLOOP instruction is used as the beginning. */
                if (inst->U.I.Opcode == RC_OPCODE_BGNLOOP && s->EndLoop < 0) {
-                       s->BeginLoop = inst->IP;
                        int loops = 1;
+                       s->BeginLoop = inst->IP;
                        struct rc_instruction * tmp;
                        for(tmp = inst->Next;
                                        tmp != &s->C->Program.Instructions;