nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.55k stars 7.69k forks source link

sttb_image: Unused functions when STBI_NO_JPEG is defined #1648

Open BlackMightyRavenDark opened 3 months ago

BlackMightyRavenDark commented 3 months ago

When defining STBI_NO_JPEG, the GCC compiler starts to show warnings:

stb_image.h:1078:12: warning: 'int stbi__mul2shorts_valid(int, int)' defined but not used [-Wunused-function] 1078 | static int stbi__mul2shorts_valid(int a, int b) stb_image.h:1070:12: warning: 'int stbi__addints_valid(int, int)' defined but not used [-Wunused-function] 1070 | static int stbi__addints_valid(int a, int b)

So, these functions must be wrapped into #ifndef STBI_NO_JPEG (maybe something else).