From c922d9d27e89e18546dee0ac1cb234294faea513 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 9 May 2010 15:24:31 -0700 Subject: [PATCH] Fixed variable use before initialize warnings --- src/video/SDL_rect.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/video/SDL_rect.c b/src/video/SDL_rect.c index 4627a9844..cb84e6ee6 100644 --- a/src/video/SDL_rect.c +++ b/src/video/SDL_rect.c @@ -122,8 +122,10 @@ SDL_bool 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_bool 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;