stb icon indicating copy to clipboard operation
stb copied to clipboard

stb_image: Fix "unused invalid_chunk" with STBI_FAILURE_USERMSG

Open grandchild opened this issue 3 years ago • 0 comments

If STBI_FAILURE_USERMSG is set, GCC warns:

stb_image.h:5183:28: warning: variable ‘invalid_chunk’ set but not used [-Wunused-but-set-variable]
    static char invalid_chunk[] = "XXXX PNG chunk not known";

Add STBI_FAILURE_USERMSG to the ifndef condition that disables the section (along with STBI_NO_FAILURE_STRINGS).


Note: I don't need (and weakly don't want) to be added to the contributor's list. I don't care about attribution.

grandchild avatar Nov 02 '22 17:11 grandchild