[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
|
to support back-door modification of png_struct in libpng-1.4.x
|
||||||
but was apparently never tested (because it does nothing and cannot
|
but was apparently never tested (because it does nothing and cannot
|
||||||
do anything).
|
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
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(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
|
to support back-door modification of png_struct in libpng-1.4.x
|
||||||
but was apparently never tested (because it does nothing and cannot
|
but was apparently never tested (because it does nothing and cannot
|
||||||
do anything).
|
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
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
@ -4097,7 +4097,7 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type,
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
{
|
{
|
||||||
png_structp pp;
|
volatile png_structp pp;
|
||||||
png_infop pi;
|
png_infop pi;
|
||||||
|
|
||||||
pp = set_store_for_write(ps, &pi, name);
|
pp = set_store_for_write(ps, &pi, name);
|
||||||
|
@ -210,7 +210,7 @@ struct exception_context { \
|
|||||||
|
|
||||||
#define Try \
|
#define Try \
|
||||||
{ \
|
{ \
|
||||||
jmp_buf *exception__prev, exception__env; \
|
jmp_buf * volatile exception__prev, exception__env; \
|
||||||
exception__prev = the_exception_context->penv; \
|
exception__prev = the_exception_context->penv; \
|
||||||
the_exception_context->penv = &exception__env; \
|
the_exception_context->penv = &exception__env; \
|
||||||
if (setjmp(exception__env) == 0) { \
|
if (setjmp(exception__env) == 0) { \
|
||||||
|
12
png.c
12
png.c
@ -766,13 +766,13 @@ png_get_copyright(png_const_structrp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
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) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# 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) 1998-2015 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
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];
|
char exponent[10];
|
||||||
|
|
||||||
/* Allow up to two leading zeros - this will not lengthen
|
/* 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
|
* of the loop don't break the number into parts so
|
||||||
* that the final digit is rounded.
|
* that the final digit is rounded.
|
||||||
*/
|
*/
|
||||||
if (cdigits+czero-clead+1 < (int)precision)
|
if (cdigits+czero+1 < precision+clead)
|
||||||
fp = modf(fp, &d);
|
fp = modf(fp, &d);
|
||||||
|
|
||||||
else
|
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;
|
*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 */
|
/* 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
|
/* Need another size check here for the exponent digits, so
|
||||||
* this need not be considered above.
|
* this need not be considered above.
|
||||||
*/
|
*/
|
||||||
if ((int)size > cdigits)
|
if (size > cdigits)
|
||||||
{
|
{
|
||||||
while (cdigits > 0) *ascii++ = exponent[--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:
|
case 2:
|
||||||
{
|
{
|
||||||
png_bytep sp, dp;
|
png_bytep sp, dp;
|
||||||
int shift, v;
|
unsigned int shift;
|
||||||
|
int v;
|
||||||
png_uint_32 i;
|
png_uint_32 i;
|
||||||
png_uint_32 row_width = row_info->width;
|
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:
|
case 4:
|
||||||
{
|
{
|
||||||
png_bytep sp, dp;
|
png_bytep sp, dp;
|
||||||
int shift, v;
|
unsigned int shift;
|
||||||
|
int v;
|
||||||
png_uint_32 i;
|
png_uint_32 i;
|
||||||
png_uint_32 row_width = row_info->width;
|
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 sp;
|
||||||
png_bytep dp;
|
png_bytep dp;
|
||||||
int shift;
|
unsigned int shift;
|
||||||
int d;
|
int d;
|
||||||
int value;
|
int value;
|
||||||
png_uint_32 i;
|
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 sp;
|
||||||
png_bytep dp;
|
png_bytep dp;
|
||||||
int shift;
|
unsigned int shift;
|
||||||
int d;
|
int d;
|
||||||
int value;
|
int value;
|
||||||
png_uint_32 i;
|
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 sp;
|
||||||
png_bytep dp;
|
png_bytep dp;
|
||||||
int shift;
|
unsigned int shift;
|
||||||
int d;
|
int d;
|
||||||
int value;
|
int value;
|
||||||
png_uint_32 i;
|
png_uint_32 i;
|
||||||
|
Loading…
Reference in New Issue
Block a user