nvfx: Silence uninitialized variable warnings.
authorVinson Lee <vlee@vmware.com>
Sun, 22 Aug 2010 05:09:47 +0000 (22:09 -0700)
committerVinson Lee <vlee@vmware.com>
Sun, 22 Aug 2010 05:15:22 +0000 (22:15 -0700)
Silence the following i686-apple-darwin10-gcc-4.2.1 warnings.
nv04_2d.c: In function 'nv04_region_copy_cpu':
nv04_2d.c:560: warning: 'dswy' may be used uninitialized in this function
nv04_2d.c:559: warning: 'dswx' may be used uninitialized in this function
nv04_2d.c:562: warning: 'sswy' may be used uninitialized in this function
nv04_2d.c:561: warning: 'sswx' may be used uninitialized in this function

src/gallium/drivers/nvfx/nv04_2d.c

index 46d5f5c08d46b75b124d7a51769f3bf000803d17..c7d53a786f28ded6e7044ed08744939a5b821e56 100644 (file)
@@ -556,10 +556,10 @@ simple:
        }
        else
        {
-               int* dswx;
-               int* dswy;
-               int* sswx;
-               int* sswy;
+               int* dswx = NULL;
+               int* dswy = NULL;
+               int* sswx = NULL;
+               int* sswy = NULL;
                int dir;
 
                if(!dst->pitch)