Skip to content

Commit

Permalink
warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Oct 16, 2018
1 parent dad4dfb commit cabcf89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions IMG_png.c
Expand Up @@ -239,7 +239,7 @@ int IMG_InitPNG()
return -1;
}
lib.png_set_interlace_handling =
(void (*) (png_structp))
(int (*) (png_structp))
SDL_LoadFunction(lib.handle, "png_set_interlace_handling");
if ( lib.png_set_interlace_handling == NULL ) {
SDL_UnloadObject(lib.handle);
Expand Down Expand Up @@ -507,7 +507,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)

/* Create the array of pointers to image data */
row_pointers = (png_bytep*) malloc(sizeof(png_bytep)*height);
if ( (row_pointers == NULL) ) {
if (row_pointers == NULL) {
error = "Out of memory";
goto done;
}
Expand Down
6 changes: 3 additions & 3 deletions IMG_xcf.c
Expand Up @@ -520,9 +520,9 @@ static unsigned char * load_xcf_tile_rle (SDL_RWops * src, Uint32 len, int bpp,

static Uint32 rgb2grey (Uint32 a) {
Uint8 l;
l = 0.2990 * ((a && 0x00FF0000) >> 16)
+ 0.5870 * ((a && 0x0000FF00) >> 8)
+ 0.1140 * ((a && 0x000000FF));
l = (Uint8)(0.2990 * ((a & 0x00FF0000) >> 16)
+ 0.5870 * ((a & 0x0000FF00) >> 8)
+ 0.1140 * ((a & 0x000000FF)));

return (l << 16) | (l << 8) | l;
}
Expand Down

0 comments on commit cabcf89

Please sign in to comment.