Fixed iOS build warnings
authorSam Lantinga <slouken@libsdl.org>
Tue, 12 Dec 2017 22:18:18 -0800
changeset 550b5bcb9cb9f6d
parent 549 66bf925397f4
child 551 21559520f1be
Fixed iOS build warnings
IMG.c
IMG_ImageIO.m
IMG_bmp.c
IMG_xpm.c
     1.1 --- a/IMG.c	Sun Dec 10 09:11:46 2017 -0800
     1.2 +++ b/IMG.c	Tue Dec 12 22:18:18 2017 -0800
     1.3 @@ -57,15 +57,15 @@
     1.4      return(&linked_version);
     1.5  }
     1.6  
     1.7 -extern int IMG_InitJPG();
     1.8 -extern void IMG_QuitJPG();
     1.9 -extern int IMG_InitPNG();
    1.10 -extern void IMG_QuitPNG();
    1.11 -extern int IMG_InitTIF();
    1.12 -extern void IMG_QuitTIF();
    1.13 +extern int IMG_InitJPG(void);
    1.14 +extern void IMG_QuitJPG(void);
    1.15 +extern int IMG_InitPNG(void);
    1.16 +extern void IMG_QuitPNG(void);
    1.17 +extern int IMG_InitTIF(void);
    1.18 +extern void IMG_QuitTIF(void);
    1.19  
    1.20 -extern int IMG_InitWEBP();
    1.21 -extern void IMG_QuitWEBP();
    1.22 +extern int IMG_InitWEBP(void);
    1.23 +extern void IMG_QuitWEBP(void);
    1.24  
    1.25  static int initialized = 0;
    1.26  
     2.1 --- a/IMG_ImageIO.m	Sun Dec 10 09:11:46 2017 -0800
     2.2 +++ b/IMG_ImageIO.m	Tue Dec 12 22:18:18 2017 -0800
     2.3 @@ -229,7 +229,7 @@
     2.4      Gmask = 0x0000FF00;
     2.5      Bmask = 0x000000FF;
     2.6  
     2.7 -    surface = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, Rmask, Gmask, Bmask, Amask);
     2.8 +    surface = SDL_CreateRGBSurface(SDL_SWSURFACE, (int)w, (int)h, 32, Rmask, Gmask, Bmask, Amask);
     2.9      if (surface)
    2.10      {
    2.11          // Sets up a context to be drawn to with surface->pixels as the area to be drawn to
    2.12 @@ -306,7 +306,7 @@
    2.13      }
    2.14  
    2.15      CGColorSpaceGetColorTable(color_space, entries);
    2.16 -    surface = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, bits_per_pixel, 0, 0, 0, 0);
    2.17 +    surface = SDL_CreateRGBSurface(SDL_SWSURFACE, (int)w, (int)h, bits_per_pixel, 0, 0, 0, 0);
    2.18      if (surface) {
    2.19          uint8_t* pixels = (uint8_t*)surface->pixels;
    2.20          CGDataProviderRef provider = CGImageGetDataProvider(image_ref);
     3.1 --- a/IMG_bmp.c	Sun Dec 10 09:11:46 2017 -0800
     3.2 +++ b/IMG_bmp.c	Tue Dec 12 22:18:18 2017 -0800
     3.3 @@ -245,7 +245,7 @@
     3.4      /* The Win32 BITMAPINFOHEADER struct (40 bytes) */
     3.5      Uint32 biSize;
     3.6      Sint32 biWidth;
     3.7 -    Sint32 biHeight;
     3.8 +    Sint32 biHeight = 0;
     3.9      Uint16 biPlanes;
    3.10      Uint16 biBitCount;
    3.11      Uint32 biCompression;
     4.1 --- a/IMG_xpm.c	Sun Dec 10 09:11:46 2017 -0800
     4.2 +++ b/IMG_xpm.c	Tue Dec 12 22:18:18 2017 -0800
     4.3 @@ -883,7 +883,7 @@
     4.4              break;
     4.5          }
     4.6          buf[6] = '\0';
     4.7 -        *rgb = SDL_strtol(buf, NULL, 16);
     4.8 +        *rgb = (Uint32)SDL_strtol(buf, NULL, 16);
     4.9          return 1;
    4.10      } else {
    4.11          int i;