From 6572c7dab5879704559bdd679719c9aa8fa22f81 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Sat, 22 Mar 2014 09:20:53 -0500 Subject: [PATCH] [libpng16] Silence 'unused parameter' build warnings (Cosmin). --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngerror.c | 3 +++ pngget.c | 25 +++++++++++++++++++++++-- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 5243ea5f8..8fc05033b 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.11beta02 - March 17, 2014 +Libpng 1.6.11beta02 - March 22, 2014 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. @@ -31,10 +31,11 @@ Version 1.6.11beta01 [March 17, 2014] Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. Moved configuration information from the manual to the INSTALL file. -Version 1.6.11beta02 [March 17, 2014] +Version 1.6.11beta02 [March 22, 2014] Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 when using its "__builtin_pow()" function. + Silence 'unused parameter' build warnings (Cosmin). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 44a5da15d..0908acc21 100644 --- a/CHANGES +++ b/CHANGES @@ -4880,10 +4880,11 @@ Version 1.6.11beta01 [March 17, 2014] Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. Moved configuration information from the manual to the INSTALL file. -Version 1.6.11beta02 [March 17, 2014] +Version 1.6.11beta02 [March 22, 2014] Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 when using its "__builtin_pow()" function. + Silence 'unused parameter' build warnings (Cosmin). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngerror.c b/pngerror.c index 7f817d212..e6fab3900 100644 --- a/pngerror.c +++ b/pngerror.c @@ -759,6 +759,9 @@ png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN) #ifdef PNG_SETJMP_SUPPORTED if (png_ptr && png_ptr->longjmp_fn && png_ptr->jmp_buf_ptr) png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val); +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(val) #endif /* If control reaches this point, png_longjmp() must not return. The only diff --git a/pngget.c b/pngget.c index aca63a958..67b31f891 100644 --- a/pngget.c +++ b/pngget.c @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.6.1 [March 28, 2013] - * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * Last changed in libpng 1.6.11 [(PENDING RELEASE)] + * Copyright (c) 1998-2014 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.) * @@ -124,6 +124,9 @@ png_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) return (info_ptr->x_pixels_per_unit); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -142,6 +145,9 @@ png_get_y_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) return (info_ptr->y_pixels_per_unit); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -159,6 +165,9 @@ png_get_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp info_ptr) info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit) return (info_ptr->x_pixels_per_unit); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -229,6 +238,9 @@ png_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) return (info_ptr->x_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -245,6 +257,9 @@ png_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) return (info_ptr->y_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -261,6 +276,9 @@ png_get_x_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) return (info_ptr->x_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0); @@ -277,6 +295,9 @@ png_get_y_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) return (info_ptr->y_offset); } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) #endif return (0);