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

[warning] stb_image_resize2.h #3707

Closed
srem1 opened this issue Jan 5, 2024 · 3 comments · Fixed by #3708
Closed

[warning] stb_image_resize2.h #3707

srem1 opened this issue Jan 5, 2024 · 3 comments · Fixed by #3708

Comments

@srem1
Copy link

srem1 commented Jan 5, 2024

In file included from rtextures.c:216:
external/stb_image_resize2.h:2866:14: warning: ‘stbir__support_zero’ defined but not used [-Wunused-function]
2866 | static float stbir__support_zero(float s, void * user_data)
| ^~~~~~~~~~~~~~~~~~~
external/stb_image_resize2.h:2503:13: warning: ‘stbir_simd_memcpy’ defined but not used [-Wunused-function]
2503 | static void stbir_simd_memcpy( void * dest, void const * src, size_t bytes )
| ^~~~~~~~~~~~~~~~~
ar rcs ../src/libraylib.a rcore.o rshapes.o rtextures.o rtext.o utils.o rglfw.o rmodels.o raudio.o
raylib static library generated (libraylib.a) in ../src!

@ghost
Copy link

ghost commented Jan 5, 2024

@srem1 Yeah, I think that's known since stb_image_resize.h got updated to stb_image_resize2.h. Luckly those are harmless.

A similar case happened to stb_truetype.h, which was handled by using #pragma (check #3235). Not sure if this is annoying enough to warrant the change tho.

@srem1
Copy link
Author

srem1 commented Jan 5, 2024

I use
-W -Wall -Werror -pedantic -pedantic-errors
and yse it harmless ;D

@raysan5
Copy link
Owner

raysan5 commented Jan 5, 2024

@ubkp Thanks for the review! Note that I'm merging it for consistency with previous solutions but I'm not fully convinved if this is the best approach to deal with those warnings. I'm not a fan of pragmas, I got the feeling that they belong to build side and not code side, despite they are supported by most compilers...

At the moment they are just a few lines in a couple of files and don't seem to generate any issue (beside an aesthetic detriment), so, keeping them for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants