diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-08-14 17:52:58 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-08-14 17:52:58 +0100 |
commit | cafff2d1c07a8cc5f212a6e46e7da619dea89cf2 (patch) | |
tree | 19cb74cbc6fad6a45b2307e4b1a2105dfc0609ef /src | |
parent | 44ba4aacabf4cf176f7cc4446237a2366e6ce4f0 (diff) | |
download | libnsbmp-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libnsbmp.c | 2 |
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; } |