Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stb_image: Fix "unused invalid_chunk" with STBI_FAILURE_USERMSG #1402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grandchild
Copy link

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.

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants