Fixed variable use before initialize warnings
authorSam Lantinga <slouken@libsdl.org>
Sun, 09 May 2010 15:24:31 -0700
changeset 44560a5dbe96c3be
parent 4455 6cf71111cf68
child 4457 5e1f9cb9fa98
Fixed variable use before initialize warnings
src/video/SDL_rect.c
     1.1 --- a/src/video/SDL_rect.c	Sun May 09 15:24:05 2010 -0700
     1.2 +++ b/src/video/SDL_rect.c	Sun May 09 15:24:31 2010 -0700
     1.3 @@ -122,8 +122,10 @@
     1.4  SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip,
     1.5                    SDL_Rect * result)
     1.6  {
     1.7 -    int minx, miny;
     1.8 -    int maxx, maxy;
     1.9 +    int minx = 0;
    1.10 +    int miny = 0;
    1.11 +    int maxx = 0;
    1.12 +    int maxy = 0;
    1.13      int x, y, i;
    1.14  
    1.15      if (count < 1) {
    1.16 @@ -222,7 +224,8 @@
    1.17  SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
    1.18                           int *Y2)
    1.19  {
    1.20 -    int x, y;
    1.21 +    int x = 0;
    1.22 +    int y = 0;
    1.23      int x1, y1;
    1.24      int x2, y2;
    1.25      int rectx1;