summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-08-14 17:52:58 +0100
committerVincent Sanders <vince@kyllikki.org>2016-08-14 17:52:58 +0100
commitcafff2d1c07a8cc5f212a6e46e7da619dea89cf2 (patch)
tree19cb74cbc6fad6a45b2307e4b1a2105dfc0609ef
parent44ba4aacabf4cf176f7cc4446237a2366e6ce4f0 (diff)
downloadlibnsbmp-cafff2d1c07a8cc5f212a6e46e7da619dea89cf2.tar.gz
libnsbmp-cafff2d1c07a8cc5f212a6e46e7da619dea89cf2.tar.bz2
make sign of comparison explicit
The size being computed cannot be negative so simply cast the result to unsigned value for the sake of comparison which resolves the warning.
-rw-r--r--src/libnsbmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnsbmp.c b/src/libnsbmp.c
index 5ce6a7b..1a13ec8 100644
--- a/src/libnsbmp.c
+++ b/src/libnsbmp.c
@@ -314,7 +314,7 @@ static bmp_result bmp_info_header_parse(bmp_image *bmp, uint8_t *data)
* but only if there is data following the palette as some
* bitmaps encode data in the palette!
*/
- if ((bmp->bitmap_offset < (data - bmp->bmp_data)) &&
+ if ((bmp->bitmap_offset < (uint32_t)(data - bmp->bmp_data)) &&
((bmp->buffer_size - (data - bmp->bmp_data)) > 0)) {
bmp->bitmap_offset = data - bmp->bmp_data;
}