Mesa (master): r300/compiler: Move declaration before code.

Vinson Lee vlee at kemper.freedesktop.org
Thu Nov 25 07:04:17 UTC 2010


Module: Mesa
Branch: master
Commit: 2cc79acc1ab5cdaadc427526a146c2c27ee0f906
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cc79acc1ab5cdaadc427526a146c2c27ee0f906

Author: Vinson Lee <vlee at vmware.com>
Date:   Wed Nov 24 23:03:26 2010 -0800

r300/compiler: Move declaration before code.

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

---

 .../dri/r300/compiler/radeon_pair_regalloc.c       |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
index 3874c7e..d53181e 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
@@ -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) {




More information about the mesa-commit mailing list