[lbpng14] Quieted some harmless warnings from Coverity-scan.

This commit is contained in:
Glenn Randers-Pehrson
2015-01-30 10:24:58 -06:00
parent 4df1247bd6
commit 173432da9e
10 changed files with 215 additions and 108 deletions

View File

@@ -1,8 +1,8 @@
/* pngwrite.c - general routines to write a PNG file
*
* Last changed in libpng 1.4.14 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* Last changed in libpng 1.4.15 [%RDATE%]
* 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.)
*
@@ -1063,14 +1063,13 @@ png_set_filter(png_structp png_ptr, int method, int filters)
{
switch (filters & (PNG_ALL_FILTERS | 0x07))
{
case PNG_FILTER_VALUE_NONE:
png_ptr->do_filter = PNG_FILTER_NONE; break;
#ifdef PNG_WRITE_FILTER_SUPPORTED
case 5:
case 6:
case 7: png_warning(png_ptr, "Unknown row filter for method 0");
#endif /* PNG_WRITE_FILTER_SUPPORTED */
case PNG_FILTER_VALUE_NONE:
png_ptr->do_filter = PNG_FILTER_NONE; break;
#ifdef PNG_WRITE_FILTER_SUPPORTED
break;
case PNG_FILTER_VALUE_SUB:
png_ptr->do_filter = PNG_FILTER_SUB; break;
case PNG_FILTER_VALUE_UP:
@@ -1082,6 +1081,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
default: png_ptr->do_filter = (png_byte)filters; break;
#else
default: png_warning(png_ptr, "Unknown row filter for method 0");
break;
#endif /* PNG_WRITE_FILTER_SUPPORTED */
}