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

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

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