LoadBMP: fix some warnings
authorSylvain Becker <sylvain.becker@gmail.com>
Sat, 31 Aug 2019 22:58:11 +0200
changeset 1304708db6a6f6c23
parent 13046 695321a18b46
child 13048 44b0a095f4b7
LoadBMP: fix some warnings
src/video/SDL_bmp.c
     1.1 --- a/src/video/SDL_bmp.c	Sat Aug 31 22:52:15 2019 +0200
     1.2 +++ b/src/video/SDL_bmp.c	Sat Aug 31 22:58:11 2019 +0200
     1.3 @@ -173,7 +173,7 @@
     1.4  SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
     1.5  {
     1.6      SDL_bool was_error;
     1.7 -    Sint64 fp_offset;
     1.8 +    Sint64 fp_offset = 0;
     1.9      int bmpPitch;
    1.10      int i, pad;
    1.11      SDL_Surface *surface;
    1.12 @@ -199,15 +199,15 @@
    1.13  
    1.14      /* The Win32 BITMAPINFOHEADER struct (40 bytes) */
    1.15      Uint32 biSize;
    1.16 -    Sint32 biWidth;
    1.17 +    Sint32 biWidth = 0;
    1.18      Sint32 biHeight = 0;
    1.19      Uint16 biPlanes;
    1.20 -    Uint16 biBitCount;
    1.21 -    Uint32 biCompression;
    1.22 +    Uint16 biBitCount = 0;
    1.23 +    Uint32 biCompression = 0;
    1.24      Uint32 biSizeImage;
    1.25      Sint32 biXPelsPerMeter;
    1.26      Sint32 biYPelsPerMeter;
    1.27 -    Uint32 biClrUsed;
    1.28 +    Uint32 biClrUsed = 0;
    1.29      Uint32 biClrImportant;
    1.30  
    1.31      /* Make sure we are passed a valid data source */
    1.32 @@ -390,7 +390,7 @@
    1.33      }
    1.34  
    1.35      /* Create a compatible surface, note that the colors are RGB ordered */
    1.36 -    surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
    1.37 +    surface = SDL_CreateRGBSurface(0,
    1.38              biWidth, biHeight, biBitCount, Rmask, Gmask, Bmask, Amask);
    1.39      if ( surface == NULL ) {
    1.40          was_error = SDL_TRUE;