Fixed uninitialized variable warnings
authorSam Lantinga <slouken@libsdl.org>
Wed, 17 May 2006 15:08:46 +0000
changeset 1849b5a4ac87b98c
parent 1848 3c5eed71a332
child 1850 d5d3a6fe05a1
Fixed uninitialized variable warnings
src/stdlib/SDL_iconv.c
src/video/SDL_stretch.c
src/video/x11/SDL_x11wm.c
     1.1 --- a/src/stdlib/SDL_iconv.c	Wed May 17 07:38:34 2006 +0000
     1.2 +++ b/src/stdlib/SDL_iconv.c	Wed May 17 15:08:46 2006 +0000
     1.3 @@ -155,7 +155,7 @@
     1.4  	/* For simplicity, we'll convert everything to and from UCS-4 */
     1.5  	char *src, *dst;
     1.6  	size_t srclen, dstlen;
     1.7 -	Uint32 ch;
     1.8 +	Uint32 ch = 0;
     1.9  	size_t total;
    1.10  
    1.11  	if ( !inbuf || !*inbuf ) {
     2.1 --- a/src/video/SDL_stretch.c	Wed May 17 07:38:34 2006 +0000
     2.2 +++ b/src/video/SDL_stretch.c	Wed May 17 15:08:46 2006 +0000
     2.3 @@ -149,7 +149,7 @@
     2.4  {
     2.5  	int i;
     2.6  	int pos, inc;
     2.7 -	Uint8 pixel[3];
     2.8 +	Uint8 pixel[3] = { 0, 0, 0 };
     2.9  
    2.10  	pos = 0x10000;
    2.11  	inc = (src_w << 16) / dst_w;
     3.1 --- a/src/video/x11/SDL_x11wm.c	Wed May 17 07:38:34 2006 +0000
     3.2 +++ b/src/video/x11/SDL_x11wm.c	Wed May 17 15:08:46 2006 +0000
     3.3 @@ -246,8 +246,8 @@
     3.4  	Status status;
     3.5  
     3.6  #ifdef X_HAVE_UTF8_STRING
     3.7 -	Atom _NET_WM_NAME;
     3.8 -	Atom _NET_WM_ICON_NAME;
     3.9 +	Atom _NET_WM_NAME = 0;
    3.10 +	Atom _NET_WM_ICON_NAME = 0;
    3.11  
    3.12  	/* Look up some useful Atoms */
    3.13  	if (SDL_X11_HAVE_UTF8) {