From cafff2d1c07a8cc5f212a6e46e7da619dea89cf2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 14 Aug 2016 17:52:58 +0100 Subject: 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. --- src/libnsbmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3