[devel] Added the private PNG_UNUSED() macro definition in pngpriv.h.

(adapted from the UNUSED() macro in pngvalid.c by John Bowler)
This commit is contained in:
Glenn Randers-Pehrson
2010-12-04 20:41:36 -06:00
parent 38ef3a592c
commit d546f4399f
11 changed files with 37 additions and 27 deletions

12
png.c
View File

@@ -550,19 +550,19 @@ png_convert_to_rfc1123(png_structp png_ptr, png_const_timep ptime)
png_const_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
#ifdef PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.5.0beta56 - November 25, 2010" PNG_STRING_NEWLINE \
"libpng version 1.5.0beta56 - December 5, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 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.5.0beta56 - November 25, 2010\
return "libpng version 1.5.0beta56 - December 5, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -589,7 +589,7 @@ png_const_charp PNGAPI
png_get_header_ver(png_structp png_ptr)
{
/* Version of *.h files used when building libpng */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
return PNG_LIBPNG_VER_STRING;
}
@@ -597,7 +597,7 @@ png_const_charp PNGAPI
png_get_header_version(png_structp png_ptr)
{
/* Returns longer string containing both version and date */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
#ifdef __STDC__
return PNG_HEADER_VERSION_STRING
# ifndef PNG_READ_SUPPORTED