From b2e96ab850b829b51e878349e5e6f08e232b0ac2 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 17 May 2006 15:08:46 +0000 Subject: [PATCH] Fixed uninitialized variable warnings --- src/stdlib/SDL_iconv.c | 2 +- src/video/SDL_stretch.c | 2 +- src/video/x11/SDL_x11wm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c index 680a3f297..1a94e0f3b 100644 --- a/src/stdlib/SDL_iconv.c +++ b/src/stdlib/SDL_iconv.c @@ -155,7 +155,7 @@ size_t SDL_iconv(SDL_iconv_t cd, /* 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 ) { diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c index 843a0ab0e..2e08c10f3 100644 --- a/src/video/SDL_stretch.c +++ b/src/video/SDL_stretch.c @@ -149,7 +149,7 @@ void copy_row3(Uint8 *src, int src_w, Uint8 *dst, int dst_w) { int i; int pos, inc; - Uint8 pixel[3]; + Uint8 pixel[3] = { 0, 0, 0 }; pos = 0x10000; inc = (src_w << 16) / dst_w; diff --git a/src/video/x11/SDL_x11wm.c b/src/video/x11/SDL_x11wm.c index b4d7836f7..a50215cd3 100644 --- a/src/video/x11/SDL_x11wm.c +++ b/src/video/x11/SDL_x11wm.c @@ -246,8 +246,8 @@ void X11_SetCaptionNoLock(_THIS, const char *title, const char *icon) 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) {