r300/compiler: Move declaration before code.
authorVinson Lee <vlee@vmware.com>
Wed, 29 Sep 2010 21:22:20 +0000 (14:22 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 29 Sep 2010 21:22:20 +0000 (14:22 -0700)
Fixes this GCC warning on linux-x86 build.
r3xx_vertprog.c: In function ‘ei_if’:
r3xx_vertprog.c:396: warning: ISO C90 forbids mixed declarations and code

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

index 08785716db5614e89518c04cf77685efe4f1c3cf..d7d49e514b9221ea385826176a27780bbc17f173 100644 (file)
@@ -392,9 +392,9 @@ static void ei_if(struct r300_vertex_program_compiler * compiler,
         * don't already have one. */
        if (!compiler->PredicateMask) {
                unsigned int writemasks[RC_REGISTER_MAX_INDEX];
-               memset(writemasks, 0, sizeof(writemasks));
                struct rc_instruction * inst;
                unsigned int i;
+               memset(writemasks, 0, sizeof(writemasks));
                for(inst = compiler->Base.Program.Instructions.Next;
                                inst != &compiler->Base.Program.Instructions;
                                                        inst = inst->Next) {