[devel] Added a typecast in png_get_int_32() to avoid compiler warning.
This commit is contained in:
parent
1e7d7d3cbf
commit
53c7502663
3
ANNOUNCE
3
ANNOUNCE
@ -307,8 +307,11 @@ version 1.5.0beta36 [July 29, 2010]
|
||||
converting the values to the fixed point form used in the PNG file.
|
||||
The standard headers no longer include zlib.h, which is currently only
|
||||
required for pngstruct.h and can therefore be internal.
|
||||
Revised png_get_int_32 to undo the PNG two's complement representation of
|
||||
negative numbers.
|
||||
|
||||
version 1.5.0beta37 [July 30, 2010]
|
||||
Added a typecast in png_get_int_32() to avoid compiler warning.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||
(subscription required; visit
|
||||
|
3
CHANGES
3
CHANGES
@ -2789,8 +2789,11 @@ version 1.5.0beta36 [July 29, 2010]
|
||||
converting the values to the fixed point form used in the PNG file.
|
||||
The standard headers no longer include zlib.h, which is currently only
|
||||
required for pngstruct.h and can therefore be internal.
|
||||
Revised png_get_int_32 to undo the PNG two's complement representation of
|
||||
negative numbers.
|
||||
|
||||
version 1.5.0beta37 [July 30, 2010]
|
||||
Added a typecast in png_get_int_32() to avoid compiler warning.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -77,11 +77,11 @@ png_int_32 (PNGAPI
|
||||
png_get_int_32)(png_bytep buf)
|
||||
{
|
||||
png_uint_32 u = png_get_uint_32(buf);
|
||||
if ((u & 0x80000000) == 0) /* negative */
|
||||
if ((u & 0x80000000) == 0) /* non-negative */
|
||||
return u;
|
||||
|
||||
u = (u ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */
|
||||
return -u;
|
||||
return -(png_int_32)u;
|
||||
}
|
||||
|
||||
/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
|
||||
|
Loading…
Reference in New Issue
Block a user