From 932d485146e888d899b31e586b5b9e9f5faac5e8 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Wed, 9 Jul 2014 23:01:29 -0700 Subject: [PATCH] fix warnings in certain console compilers --- stb_image.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stb_image.h b/stb_image.h index ff7eb49..296a35a 100644 --- a/stb_image.h +++ b/stb_image.h @@ -354,7 +354,7 @@ STBIDEF void stbi_install_YCbCr_to_RGB(stbi_YCbCr_to_RGB_run func); #include #endif #include -#include +#include #include #include #include // ptrdiff_t on osx @@ -4119,7 +4119,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i } case 0x3B: // gif stream termination code - return (stbi_uc *) 1; + return (stbi_uc *) s; // using '1' causes warning on some compilers default: return stbi__errpuc("unknown code", "Corrupt GIF"); @@ -4134,7 +4134,7 @@ static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int memset(&g, 0, sizeof(g)); u = stbi__gif_load_next(s, &g, comp, req_comp); - if (u == (void *) 1) u = 0; // end of animated gif marker + if (u == (stbi_uc *) s) u = 0; // end of animated gif marker if (u) { *x = g.w; *y = g.h;