Mesa (master): nvfx: Silence uninitialized variable warnings.

Vinson Lee vlee at kemper.freedesktop.org
Sun Aug 22 05:17:05 UTC 2010


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Aug 21 22:09:47 2010 -0700

nvfx: Silence uninitialized variable warnings.

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 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/nvfx/nv04_2d.c b/src/gallium/drivers/nvfx/nv04_2d.c
index 46d5f5c..c7d53a7 100644
--- a/src/gallium/drivers/nvfx/nv04_2d.c
+++ b/src/gallium/drivers/nvfx/nv04_2d.c
@@ -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)




More information about the mesa-commit mailing list