From a76059377d9246da827e0148c0f6a95ae11c43cd Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Sun, 23 Dec 2012 19:24:57 +1300 Subject: [PATCH] Warning free SOIL lib. --- Externals/SOIL/stb_image_aug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Externals/SOIL/stb_image_aug.c b/Externals/SOIL/stb_image_aug.c index 2bbb50b1bf..450d6c4b8c 100644 --- a/Externals/SOIL/stb_image_aug.c +++ b/Externals/SOIL/stb_image_aug.c @@ -2394,6 +2394,7 @@ static int parse_png_file(png *z, int scan, int req_comp) // if critical, fail if ((c.type & (1 << 29)) == 0) { #ifndef STBI_NO_FAILURE_STRINGS + #ifndef STBI_FAILURE_USERMSG // not threadsafe static char invalid_chunk[] = "XXXX chunk not known"; invalid_chunk[0] = (uint8) (c.type >> 24); @@ -2401,6 +2402,7 @@ static int parse_png_file(png *z, int scan, int req_comp) invalid_chunk[2] = (uint8) (c.type >> 8); invalid_chunk[3] = (uint8) (c.type >> 0); #endif + #endif return e(invalid_chunk, "PNG not supported: unknown chunk type"); } skip(s, c.length); @@ -2584,7 +2586,7 @@ static int shiftsigned(int v, int shift, int bits) static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp) { uint8 *out; - unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0; + unsigned int mr=0,mg=0,mb=0,ma=0; stbi_uc pal[256][4]; int psize=0,i,j,compress=0,width; int bpp, flip_vertically, pad, target, offset, hsz; @@ -2634,7 +2636,6 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp) mg = 0xff << 8; mb = 0xff << 0; ma = 0xff << 24; - fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255 } else { mr = 31 << 10; mg = 31 << 5;