src/video/SDL_bmp.c
changeset 6389 43a190ad60a7
parent 6138 4c64952a58fb
child 6666 018f8019ce36
     1.1 --- a/src/video/SDL_bmp.c	Wed Aug 08 13:44:58 2012 -0400
     1.2 +++ b/src/video/SDL_bmp.c	Thu Aug 09 14:14:41 2012 -0400
     1.3 @@ -67,23 +67,23 @@
     1.4  
     1.5      /* The Win32 BMP file header (14 bytes) */
     1.6      char magic[2];
     1.7 -    Uint32 bfSize;
     1.8 -    Uint16 bfReserved1;
     1.9 -    Uint16 bfReserved2;
    1.10 -    Uint32 bfOffBits;
    1.11 +    /*Uint32 bfSize = 0;*/
    1.12 +    /*Uint16 bfReserved1 = 0;*/
    1.13 +    /*Uint16 bfReserved2 = 0;*/
    1.14 +    Uint32 bfOffBits = 0;
    1.15  
    1.16      /* The Win32 BITMAPINFOHEADER struct (40 bytes) */
    1.17 -    Uint32 biSize;
    1.18 -    Sint32 biWidth;
    1.19 -    Sint32 biHeight;
    1.20 -    Uint16 biPlanes;
    1.21 -    Uint16 biBitCount;
    1.22 -    Uint32 biCompression;
    1.23 -    Uint32 biSizeImage;
    1.24 -    Sint32 biXPelsPerMeter;
    1.25 -    Sint32 biYPelsPerMeter;
    1.26 -    Uint32 biClrUsed;
    1.27 -    Uint32 biClrImportant;
    1.28 +    Uint32 biSize = 0;
    1.29 +    Sint32 biWidth = 0;
    1.30 +    Sint32 biHeight = 0;
    1.31 +    /*Uint16 biPlanes = 0;*/
    1.32 +    Uint16 biBitCount = 0;
    1.33 +    Uint32 biCompression = 0;
    1.34 +    /*Uint32 biSizeImage = 0;*/
    1.35 +    /*Sint32 biXPelsPerMeter = 0;*/
    1.36 +    /*Sint32 biYPelsPerMeter = 0;*/
    1.37 +    Uint32 biClrUsed = 0;
    1.38 +    /*Uint32 biClrImportant = 0;*/
    1.39  
    1.40      /* Make sure we are passed a valid data source */
    1.41      surface = NULL;
    1.42 @@ -106,9 +106,9 @@
    1.43          was_error = SDL_TRUE;
    1.44          goto done;
    1.45      }
    1.46 -    bfSize = SDL_ReadLE32(src);
    1.47 -    bfReserved1 = SDL_ReadLE16(src);
    1.48 -    bfReserved2 = SDL_ReadLE16(src);
    1.49 +    /*bfSize =*/ SDL_ReadLE32(src);
    1.50 +    /*bfReserved1 =*/ SDL_ReadLE16(src);
    1.51 +    /*bfReserved2 =*/ SDL_ReadLE16(src);
    1.52      bfOffBits = SDL_ReadLE32(src);
    1.53  
    1.54      /* Read the Win32 BITMAPINFOHEADER */
    1.55 @@ -116,25 +116,20 @@
    1.56      if (biSize == 12) {
    1.57          biWidth = (Uint32) SDL_ReadLE16(src);
    1.58          biHeight = (Uint32) SDL_ReadLE16(src);
    1.59 -        biPlanes = SDL_ReadLE16(src);
    1.60 +        /*biPlanes =*/ SDL_ReadLE16(src);
    1.61          biBitCount = SDL_ReadLE16(src);
    1.62          biCompression = BI_RGB;
    1.63 -        biSizeImage = 0;
    1.64 -        biXPelsPerMeter = 0;
    1.65 -        biYPelsPerMeter = 0;
    1.66 -        biClrUsed = 0;
    1.67 -        biClrImportant = 0;
    1.68      } else {
    1.69          biWidth = SDL_ReadLE32(src);
    1.70          biHeight = SDL_ReadLE32(src);
    1.71 -        biPlanes = SDL_ReadLE16(src);
    1.72 +        /*biPlanes =*/ SDL_ReadLE16(src);
    1.73          biBitCount = SDL_ReadLE16(src);
    1.74          biCompression = SDL_ReadLE32(src);
    1.75 -        biSizeImage = SDL_ReadLE32(src);
    1.76 -        biXPelsPerMeter = SDL_ReadLE32(src);
    1.77 -        biYPelsPerMeter = SDL_ReadLE32(src);
    1.78 +        /*biSizeImage =*/ SDL_ReadLE32(src);
    1.79 +        /*biXPelsPerMeter =*/ SDL_ReadLE32(src);
    1.80 +        /*biYPelsPerMeter =*/ SDL_ReadLE32(src);
    1.81          biClrUsed = SDL_ReadLE32(src);
    1.82 -        biClrImportant = SDL_ReadLE32(src);
    1.83 +        /*biClrImportant =*/ SDL_ReadLE32(src);
    1.84      }
    1.85      if (biHeight < 0) {
    1.86          topDown = SDL_TRUE;