[libpng16] Fixed cexcept.h in which GCC 5 now reports that one of the auto
variables in the Try macro needs to be volatile to prevent value being lost over the setjmp.
This commit is contained in:
parent
25bfb13770
commit
b780eba4e4
3
ANNOUNCE
3
ANNOUNCE
@ -75,6 +75,9 @@ Version 1.6.18beta07 [June 3, 2015]
|
||||
to support back-door modification of png_struct in libpng-1.4.x
|
||||
but was apparently never tested (because it does nothing and cannot
|
||||
do anything).
|
||||
Fixed cexcept.h in which GCC 5 now reports that one of the auto
|
||||
variables in the Try macro needs to be volatile to prevent value
|
||||
being lost over the setjmp.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
3
CHANGES
3
CHANGES
@ -5260,6 +5260,9 @@ Version 1.6.18beta07 [June 3, 2015]
|
||||
to support back-door modification of png_struct in libpng-1.4.x
|
||||
but was apparently never tested (because it does nothing and cannot
|
||||
do anything).
|
||||
Fixed cexcept.h in which GCC 5 now reports that one of the auto
|
||||
variables in the Try macro needs to be volatile to prevent value
|
||||
being lost over the setjmp.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -4097,7 +4097,7 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type,
|
||||
|
||||
Try
|
||||
{
|
||||
png_structp pp;
|
||||
volatile png_structp pp;
|
||||
png_infop pi;
|
||||
|
||||
pp = set_store_for_write(ps, &pi, name);
|
||||
|
@ -210,7 +210,7 @@ struct exception_context { \
|
||||
|
||||
#define Try \
|
||||
{ \
|
||||
jmp_buf *exception__prev, exception__env; \
|
||||
jmp_buf * volatile exception__prev, exception__env; \
|
||||
exception__prev = the_exception_context->penv; \
|
||||
the_exception_context->penv = &exception__env; \
|
||||
if (setjmp(exception__env) == 0) { \
|
||||
|
12
png.c
12
png.c
@ -766,13 +766,13 @@ png_get_copyright(png_const_structrp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.18beta07 - June 1, 2015" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.18beta07 - June 3, 2015" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||
PNG_STRING_NEWLINE;
|
||||
# else
|
||||
return "libpng version 1.6.18beta07 - June 1, 2015\
|
||||
return "libpng version 1.6.18beta07 - June 3, 2015\
|
||||
Copyright (c) 1998-2015 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
@ -2892,7 +2892,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
|
||||
*/
|
||||
|
||||
{
|
||||
int czero, clead, cdigits;
|
||||
unsigned int czero, clead, cdigits;
|
||||
char exponent[10];
|
||||
|
||||
/* Allow up to two leading zeros - this will not lengthen
|
||||
@ -2922,7 +2922,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
|
||||
* of the loop don't break the number into parts so
|
||||
* that the final digit is rounded.
|
||||
*/
|
||||
if (cdigits+czero-clead+1 < (int)precision)
|
||||
if (cdigits+czero+1 < precision+clead)
|
||||
fp = modf(fp, &d);
|
||||
|
||||
else
|
||||
@ -3028,7 +3028,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
|
||||
*ascii++ = (char)(48 + (int)d), ++cdigits;
|
||||
}
|
||||
}
|
||||
while (cdigits+czero-clead < (int)precision && fp > DBL_MIN);
|
||||
while (cdigits+czero < precision+clead && fp > DBL_MIN);
|
||||
|
||||
/* The total output count (max) is now 4+precision */
|
||||
|
||||
@ -3096,7 +3096,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
|
||||
/* Need another size check here for the exponent digits, so
|
||||
* this need not be considered above.
|
||||
*/
|
||||
if ((int)size > cdigits)
|
||||
if (size > cdigits)
|
||||
{
|
||||
while (cdigits > 0) *ascii++ = exponent[--cdigits];
|
||||
|
||||
|
@ -71,7 +71,8 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
case 2:
|
||||
{
|
||||
png_bytep sp, dp;
|
||||
int shift, v;
|
||||
unsigned int shift;
|
||||
int v;
|
||||
png_uint_32 i;
|
||||
png_uint_32 row_width = row_info->width;
|
||||
|
||||
@ -110,7 +111,8 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||
case 4:
|
||||
{
|
||||
png_bytep sp, dp;
|
||||
int shift, v;
|
||||
unsigned int shift;
|
||||
int v;
|
||||
png_uint_32 i;
|
||||
png_uint_32 row_width = row_info->width;
|
||||
|
||||
|
@ -2167,7 +2167,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
{
|
||||
png_bytep sp;
|
||||
png_bytep dp;
|
||||
int shift;
|
||||
unsigned int shift;
|
||||
int d;
|
||||
int value;
|
||||
png_uint_32 i;
|
||||
@ -2205,7 +2205,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
{
|
||||
png_bytep sp;
|
||||
png_bytep dp;
|
||||
int shift;
|
||||
unsigned int shift;
|
||||
int d;
|
||||
int value;
|
||||
png_uint_32 i;
|
||||
@ -2242,7 +2242,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
{
|
||||
png_bytep sp;
|
||||
png_bytep dp;
|
||||
int shift;
|
||||
unsigned int shift;
|
||||
int d;
|
||||
int value;
|
||||
png_uint_32 i;
|
||||
|
Loading…
Reference in New Issue
Block a user