r300/compiler: Move declaration before code.
authorVinson Lee <vlee@vmware.com>
Fri, 5 Nov 2010 00:25:16 +0000 (17:25 -0700)
committerVinson Lee <vlee@vmware.com>
Fri, 5 Nov 2010 00:25:16 +0000 (17:25 -0700)
Fixes this GCC warning with linux-x86 build.
radeon_dataflow.c: In function 'get_readers_normal_read_callback':
radeon_dataflow.c:472: warning: ISO C90 forbids mixed declarations and code

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

index 885e227..fd94194 100644 (file)
@@ -465,15 +465,16 @@ static void get_readers_normal_read_callback(
 {
        struct get_readers_callback_data * d = userdata;
        unsigned int read_mask;
+       unsigned int shared_mask;
 
        if (src->RelAddr)
                d->ReaderData->Abort = 1;
 
-       unsigned int shared_mask = rc_src_reads_dst_mask(src->File, src->Index,
-                               src->Swizzle,
-                               d->ReaderData->Writer->U.I.DstReg.File,
-                               d->ReaderData->Writer->U.I.DstReg.Index,
-                               d->AliveWriteMask);
+       shared_mask = rc_src_reads_dst_mask(src->File, src->Index,
+               src->Swizzle,
+               d->ReaderData->Writer->U.I.DstReg.File,
+               d->ReaderData->Writer->U.I.DstReg.Index,
+               d->AliveWriteMask);
 
        if (shared_mask == RC_MASK_NONE)
                return;