changeset 4456:0a5dbe96c3be

Fixed variable use before initialize warnings
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 May 2010 15:24:31 -0700
parents 6cf71111cf68
children 5e1f9cb9fa98
files src/video/SDL_rect.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_rect.c	Sun May 09 15:24:05 2010 -0700
+++ b/src/video/SDL_rect.c	Sun May 09 15:24:31 2010 -0700
@@ -122,8 +122,10 @@
 SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip,
                   SDL_Rect * result)
 {
-    int minx, miny;
-    int maxx, maxy;
+    int minx = 0;
+    int miny = 0;
+    int maxx = 0;
+    int maxy = 0;
     int x, y, i;
 
     if (count < 1) {
@@ -222,7 +224,8 @@
 SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
                          int *Y2)
 {
-    int x, y;
+    int x = 0;
+    int y = 0;
     int x1, y1;
     int x2, y2;
     int rectx1;