From 48ffc6bc5576a716c5c105f7fb4f8b8d7ea45357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ptak?= Date: Sat, 16 Mar 2019 23:00:14 +0100 Subject: [PATCH] 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); --- stb_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_image.h b/stb_image.h index a6202a3..b820277 100644 --- a/stb_image.h +++ b/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];