Skip to content

Commit

Permalink
Fixed iOS build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 13, 2017
1 parent 32451da commit a20e4e4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions IMG.c
Expand Up @@ -57,15 +57,15 @@ const SDL_version *IMG_Linked_Version(void)
return(&linked_version);
}

extern int IMG_InitJPG();
extern void IMG_QuitJPG();
extern int IMG_InitPNG();
extern void IMG_QuitPNG();
extern int IMG_InitTIF();
extern void IMG_QuitTIF();

extern int IMG_InitWEBP();
extern void IMG_QuitWEBP();
extern int IMG_InitJPG(void);
extern void IMG_QuitJPG(void);
extern int IMG_InitPNG(void);
extern void IMG_QuitPNG(void);
extern int IMG_InitTIF(void);
extern void IMG_QuitTIF(void);

extern int IMG_InitWEBP(void);
extern void IMG_QuitWEBP(void);

static int initialized = 0;

Expand Down
4 changes: 2 additions & 2 deletions IMG_ImageIO.m
Expand Up @@ -229,7 +229,7 @@ static CFDictionaryRef CreateHintDictionary(CFStringRef uti_string_hint)
Gmask = 0x0000FF00;
Bmask = 0x000000FF;

surface = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, Rmask, Gmask, Bmask, Amask);
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, (int)w, (int)h, 32, Rmask, Gmask, Bmask, Amask);
if (surface)
{
// Sets up a context to be drawn to with surface->pixels as the area to be drawn to
Expand Down Expand Up @@ -306,7 +306,7 @@ static CFDictionaryRef CreateHintDictionary(CFStringRef uti_string_hint)
}

CGColorSpaceGetColorTable(color_space, entries);
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, bits_per_pixel, 0, 0, 0, 0);
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, (int)w, (int)h, bits_per_pixel, 0, 0, 0, 0);
if (surface) {
uint8_t* pixels = (uint8_t*)surface->pixels;
CGDataProviderRef provider = CGImageGetDataProvider(image_ref);
Expand Down
2 changes: 1 addition & 1 deletion IMG_bmp.c
Expand Up @@ -245,7 +245,7 @@ static SDL_Surface *LoadBMP_RW (SDL_RWops *src, int freesrc)
/* The Win32 BITMAPINFOHEADER struct (40 bytes) */
Uint32 biSize;
Sint32 biWidth;
Sint32 biHeight;
Sint32 biHeight = 0;
Uint16 biPlanes;
Uint16 biBitCount;
Uint32 biCompression;
Expand Down
2 changes: 1 addition & 1 deletion IMG_xpm.c
Expand Up @@ -883,7 +883,7 @@ static int color_to_rgb(char *spec, int speclen, Uint32 *rgb)
break;
}
buf[6] = '\0';
*rgb = SDL_strtol(buf, NULL, 16);
*rgb = (Uint32)SDL_strtol(buf, NULL, 16);
return 1;
} else {
int i;
Expand Down

0 comments on commit a20e4e4

Please sign in to comment.