changeset 1849:b5a4ac87b98c

Fixed uninitialized variable warnings
author Sam Lantinga <slouken@libsdl.org>
date Wed, 17 May 2006 15:08:46 +0000
parents 3c5eed71a332
children d5d3a6fe05a1
files src/stdlib/SDL_iconv.c src/video/SDL_stretch.c src/video/x11/SDL_x11wm.c
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/stdlib/SDL_iconv.c	Wed May 17 07:38:34 2006 +0000
+++ b/src/stdlib/SDL_iconv.c	Wed May 17 15:08:46 2006 +0000
@@ -155,7 +155,7 @@
 	/* For simplicity, we'll convert everything to and from UCS-4 */
 	char *src, *dst;
 	size_t srclen, dstlen;
-	Uint32 ch;
+	Uint32 ch = 0;
 	size_t total;
 
 	if ( !inbuf || !*inbuf ) {
--- a/src/video/SDL_stretch.c	Wed May 17 07:38:34 2006 +0000
+++ b/src/video/SDL_stretch.c	Wed May 17 15:08:46 2006 +0000
@@ -149,7 +149,7 @@
 {
 	int i;
 	int pos, inc;
-	Uint8 pixel[3];
+	Uint8 pixel[3] = { 0, 0, 0 };
 
 	pos = 0x10000;
 	inc = (src_w << 16) / dst_w;
--- a/src/video/x11/SDL_x11wm.c	Wed May 17 07:38:34 2006 +0000
+++ b/src/video/x11/SDL_x11wm.c	Wed May 17 15:08:46 2006 +0000
@@ -246,8 +246,8 @@
 	Status status;
 
 #ifdef X_HAVE_UTF8_STRING
-	Atom _NET_WM_NAME;
-	Atom _NET_WM_ICON_NAME;
+	Atom _NET_WM_NAME = 0;
+	Atom _NET_WM_ICON_NAME = 0;
 
 	/* Look up some useful Atoms */
 	if (SDL_X11_HAVE_UTF8) {