Skip to content
Myr

Fix gcc warning: expression always true

Before adoption: this commit came in with the history the project adopted, so no landing records it.

stb_image.h:5113:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] STBI_ASSERT(v >= 0 && v < 256);

authored by Łukasz Ptak · committed by GitHub · parent 2c2908f · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:stb_image.h+1 added-1 removed
5108 unmodified lines
5109 if (shift < 0)5110 v <<= -shift;5111 else5112 v >>= shift;5113 STBI_ASSERT(v >= 0 && v < 256);5113 STBI_ASSERT(v < 256);5114 v >>= (8-bits);5115 STBI_ASSERT(bits >= 0 && bits <= 8);5116 return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];5117}
2430 unmodified lines