[libpng16] Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler

(Bug report by Viktor Szaka'ts).  Several warnings remain and are
unavoidable, where we test for overflow.
This commit is contained in:
Glenn Randers-Pehrson 2015-07-29 07:29:17 -05:00
parent 1fa62ae734
commit e485a09e0e
4 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,4 @@
Libpng 1.6.19beta01 - July 26, 2015
Libpng 1.6.19beta01 - July 29, 2015
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -25,13 +25,18 @@ Other information:
Changes since the last public release (1.6.18):
Version 1.6.19beta01 [July 26, 2015]
Version 1.6.19beta01 [July 29, 2015]
Updated obsolete information about the simplified API macros in the
manual pages (Bug report by Arc Riley).
Avoid potentially dereferencing NULL info_ptr in png_info_init_3().
Rearranged png.h to put the major sections in the same order as
in libpng17.
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
PNG_WEIGHT_FACTOR macros.
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
(Bug report by Viktor Szaka'ts). Several warnings remain and are
unavoidable, where we test for overflow.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5305,12 +5305,17 @@ Version 1.6.18rc03 [July 15, 2015]
Version 1.6.18 [July 23, 2015]
No changes.
Version 1.6.19beta01 [July 26, 2015]
Version 1.6.19beta01 [July 29, 2015]
Updated obsolete information about the simplified API macros in the
manual pages (Bug report by Arc Riley).
Avoid potentially dereferencing NULL info_ptr in png_info_init_3().
Rearranged png.h to put the major sections in the same order as
in libpng17.
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
PNG_WEIGHT_FACTOR macros.
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
(Bug report by Viktor Szaka'ts). Several warnings remain and are
unavoidable, where we test for overflow.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

7
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.6.18 [July 23, 2015]
* Last changed in libpng 1.6.19 [(PENDING RELEASE)]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -724,6 +724,7 @@ png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime)
APPEND(':');
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second);
APPEND_STRING(" +0000"); /* This reliably terminates the buffer */
PNG_UNUSED (pos)
# undef APPEND
# undef APPEND_NUMBER
@ -768,13 +769,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.19beta01 - July 25, 2015" PNG_STRING_NEWLINE \
"libpng version 1.6.19beta01 - July 29, 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.19beta01 - July 25, 2015\
return "libpng version 1.6.19beta01 - July 29, 2015\
Copyright (c) 1998-2015 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.6.18 [July 23, 2015]
* Last changed in libpng 1.6.19 [(PENDING RELEASE)]
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1818,7 +1818,7 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
return;
}
if (length > png_ptr->num_palette ||
if (length > (unsigned int) png_ptr->num_palette ||
length > (unsigned int) PNG_MAX_PALETTE_LENGTH ||
length == 0)
{
@ -1982,7 +1982,8 @@ png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
num = length / 2 ;
if (num != png_ptr->num_palette || num > (unsigned int) PNG_MAX_PALETTE_LENGTH)
if (num != (unsigned int) png_ptr->num_palette ||
num > (unsigned int) PNG_MAX_PALETTE_LENGTH)
{
png_crc_finish(png_ptr, length);
png_chunk_benign_error(png_ptr, "invalid");