[libpng16] Removed unreachable "break" statements in png.c, pngread.c, and
pngrtran.c to suppress clang warnings (Bug report by Viktor Szakats).
This commit is contained in:
parent
0e9cd91609
commit
4e1d299e6b
8
ANNOUNCE
8
ANNOUNCE
@ -1,4 +1,4 @@
|
|||||||
Libpng 1.6.19beta02 - August 3, 2015
|
Libpng 1.6.19beta02 - August 7, 2015
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -35,15 +35,17 @@ Version 1.6.19beta01 [July 30, 2015]
|
|||||||
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
|
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
|
||||||
PNG_WEIGHT_FACTOR macros.
|
PNG_WEIGHT_FACTOR macros.
|
||||||
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
|
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
|
||||||
(Bug report by Viktor Szaka'ts). Several warnings remain and are
|
(Bug report by Viktor Szakats). Several warnings remain and are
|
||||||
unavoidable, where we test for overflow.
|
unavoidable, where we test for overflow.
|
||||||
Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
|
Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
|
||||||
Fixed uninitialized variable in contrib/gregbook/rpng2-x.c
|
Fixed uninitialized variable in contrib/gregbook/rpng2-x.c
|
||||||
|
|
||||||
Version 1.6.19beta02 [August 3, 2015]
|
Version 1.6.19beta02 [August 7, 2015]
|
||||||
Moved config.h.in~ from the "libpng_autotools_files" list to the
|
Moved config.h.in~ from the "libpng_autotools_files" list to the
|
||||||
"libpng_autotools_extra" list in autogen.sh because it was causing a
|
"libpng_autotools_extra" list in autogen.sh because it was causing a
|
||||||
false positive for missing files (bug report by Robert C. Seacord).
|
false positive for missing files (bug report by Robert C. Seacord).
|
||||||
|
Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c
|
||||||
|
to suppress clang warnings (Bug report by Viktor Szakats).
|
||||||
|
|
||||||
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
|
||||||
|
8
CHANGES
8
CHANGES
@ -5225,7 +5225,7 @@ Version 1.6.18beta01 [April 1, 2015]
|
|||||||
|
|
||||||
Version 1.6.18beta02 [April 26, 2015]
|
Version 1.6.18beta02 [April 26, 2015]
|
||||||
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
|
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
|
||||||
(Bug report by Viktor Szaka'ts).
|
(Bug report by Viktor Szakats).
|
||||||
|
|
||||||
Version 1.6.18beta03 [May 6, 2015]
|
Version 1.6.18beta03 [May 6, 2015]
|
||||||
Replaced "unexpected" with an integer (0xabadca11) in pngset.c
|
Replaced "unexpected" with an integer (0xabadca11) in pngset.c
|
||||||
@ -5314,15 +5314,17 @@ Version 1.6.19beta01 [July 30, 2015]
|
|||||||
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
|
Eliminated unused PNG_COST_SHIFT, PNG_WEIGHT_SHIFT, PNG_COST_FACTOR, and
|
||||||
PNG_WEIGHT_FACTOR macros.
|
PNG_WEIGHT_FACTOR macros.
|
||||||
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
|
Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler
|
||||||
(Bug report by Viktor Szaka'ts). Several warnings remain and are
|
(Bug report by Viktor Szakats). Several warnings remain and are
|
||||||
unavoidable, where we test for overflow.
|
unavoidable, where we test for overflow.
|
||||||
Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
|
Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
|
||||||
Fixed uninitialized variable in contrib/gregbook/rpng2-x.c
|
Fixed uninitialized variable in contrib/gregbook/rpng2-x.c
|
||||||
|
|
||||||
Version 1.6.19beta02 [August 3, 2015]
|
Version 1.6.19beta02 [August 7, 2015]
|
||||||
Moved config.h.in~ from the "libpng_autotools_files" list to the
|
Moved config.h.in~ from the "libpng_autotools_files" list to the
|
||||||
"libpng_autotools_extra" list in autogen.sh because it was causing a
|
"libpng_autotools_extra" list in autogen.sh because it was causing a
|
||||||
false positive for missing files (bug report by Robert C. Seacord).
|
false positive for missing files (bug report by Robert C. Seacord).
|
||||||
|
Removed unreachable "break" statements in png.c, pngread.c, and pngrtran.c
|
||||||
|
to suppress clang warnings (Bug report by Viktor Szakats).
|
||||||
|
|
||||||
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
|
||||||
|
6
png.c
6
png.c
@ -769,13 +769,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.19beta02 - July 30, 2015" PNG_STRING_NEWLINE \
|
"libpng version 1.6.19beta02 - August 7, 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.19beta02 - July 30, 2015\
|
return "libpng version 1.6.19beta02 - August 7, 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.";
|
||||||
@ -1706,7 +1706,6 @@ png_colorspace_set_chromaticities(png_const_structrp png_ptr,
|
|||||||
*/
|
*/
|
||||||
colorspace->flags |= PNG_COLORSPACE_INVALID;
|
colorspace->flags |= PNG_COLORSPACE_INVALID;
|
||||||
png_error(png_ptr, "internal error checking chromaticities");
|
png_error(png_ptr, "internal error checking chromaticities");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0; /* failed */
|
return 0; /* failed */
|
||||||
@ -1734,7 +1733,6 @@ png_colorspace_set_endpoints(png_const_structrp png_ptr,
|
|||||||
default:
|
default:
|
||||||
colorspace->flags |= PNG_COLORSPACE_INVALID;
|
colorspace->flags |= PNG_COLORSPACE_INVALID;
|
||||||
png_error(png_ptr, "internal error checking chromaticities");
|
png_error(png_ptr, "internal error checking chromaticities");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0; /* failed */
|
return 0; /* failed */
|
||||||
|
19
pngread.c
19
pngread.c
@ -1683,10 +1683,11 @@ decode_gamma(png_image_read_control *display, png_uint_32 value, int encoding)
|
|||||||
value *= 257;
|
value *= 257;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef PNG_DEBUG
|
||||||
default:
|
default:
|
||||||
png_error(display->image->opaque->png_ptr,
|
png_error(display->image->opaque->png_ptr,
|
||||||
"unexpected encoding (internal error)");
|
"unexpected encoding (internal error)");
|
||||||
break;
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
@ -2847,10 +2848,6 @@ png_image_read_colormap(png_voidp argument)
|
|||||||
|
|
||||||
switch (data_encoding)
|
switch (data_encoding)
|
||||||
{
|
{
|
||||||
default:
|
|
||||||
png_error(png_ptr, "bad data option (internal error)");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case P_sRGB:
|
case P_sRGB:
|
||||||
/* Change to 8-bit sRGB */
|
/* Change to 8-bit sRGB */
|
||||||
png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, PNG_GAMMA_sRGB);
|
png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, PNG_GAMMA_sRGB);
|
||||||
@ -2860,6 +2857,11 @@ png_image_read_colormap(png_voidp argument)
|
|||||||
if (png_ptr->bit_depth > 8)
|
if (png_ptr->bit_depth > 8)
|
||||||
png_set_scale_16(png_ptr);
|
png_set_scale_16(png_ptr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef PNG_DEBUG
|
||||||
|
default:
|
||||||
|
png_error(png_ptr, "bad data option (internal error)");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmap_entries > 256 || cmap_entries > image->colormap_entries)
|
if (cmap_entries > 256 || cmap_entries > image->colormap_entries)
|
||||||
@ -3410,10 +3412,6 @@ png_image_read_background(png_voidp argument)
|
|||||||
*/
|
*/
|
||||||
switch (info_ptr->bit_depth)
|
switch (info_ptr->bit_depth)
|
||||||
{
|
{
|
||||||
default:
|
|
||||||
png_error(png_ptr, "unexpected bit depth");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
/* 8-bit sRGB gray values with an alpha channel; the alpha channel is
|
/* 8-bit sRGB gray values with an alpha channel; the alpha channel is
|
||||||
* to be removed by composing on a background: either the row if
|
* to be removed by composing on a background: either the row if
|
||||||
@ -3631,6 +3629,9 @@ png_image_read_background(png_voidp argument)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
png_error(png_ptr, "unexpected bit depth");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -976,7 +976,6 @@ png_set_rgb_to_gray_fixed(png_structrp png_ptr, int error_action,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
png_error(png_ptr, "invalid error action to rgb_to_gray");
|
png_error(png_ptr, "invalid error action to rgb_to_gray");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
|
Loading…
Reference in New Issue
Block a user