[devel] Added typecasts in png_get_int_32() in png.h to avoid compiler warning.

This commit is contained in:
Glenn Randers-Pehrson
2010-07-30 14:35:50 -05:00
parent b4e6997999
commit dd80757941
3 changed files with 6 additions and 4 deletions

4
png.h
View File

@@ -2023,8 +2023,8 @@ PNG_EXPORT(png_bytep,png_get_io_chunk_name,(png_structp png_ptr),,200);
((png_uint_32)(*((buf) + 1))))
# define png_get_int_32(buf) \
((png_int_32)((*(buf) & 0x80) \
? -((png_get_uint_32(buf) ^ 0xffffffff)+1) \
: png_get_uint_32(buf)))
? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffff)+1)) \
: (png_int_32)png_get_uint_32(buf)))
#endif
#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED