Fix gcc warning: expression always true

stb_image.h:5113:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    STBI_ASSERT(v >= 0 && v < 256);
master
Łukasz Ptak ago%!(EXTRA string=6 years) committed by GitHub
parent 2c2908f505
commit 48ffc6bc55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      stb_image.h

@ -5110,7 +5110,7 @@ static int stbi__shiftsigned(unsigned int v, int shift, int bits)
v <<= -shift;
else
v >>= shift;
STBI_ASSERT(v >= 0 && v < 256);
STBI_ASSERT(v < 256);
v >>= (8-bits);
STBI_ASSERT(bits >= 0 && bits <= 8);
return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];

Loading…
Cancel
Save