From b3edc73afa01b101e8e9773a2298d082bb2c0823 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sun, 21 Nov 2010 14:06:41 -0600 Subject: [devel] Changes to remove gcc warnings (John Bowler) Certain optional gcc warning flags resulted in warnings in libpng code. With these changes only -Wconversion and -Wcast-qual cannot be turned on. Changes are trivial rearrangements of code. -Wconversion is not possible for pngrutil.c (because of the widespread use of += et al on variables smaller than (int) or (unsigned int)) and -Wcast-qual is not possible with pngwio.c and pngwutil.c because the 'write' callback and zlib compression both fail to declare their input buffers with 'const'. --- pngwtran.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pngwtran.c') diff --git a/pngwtran.c b/pngwtran.c index 066e1e2c9..1765ef89d 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -220,6 +220,9 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) break; } + + default: + break; } row_info->bit_depth = (png_byte)bit_depth; -- cgit v1.2.1