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

This commit is contained in:
Glenn Randers-Pehrson 2011-03-08 11:33:28 -06:00
parent 86946fdc03
commit 603c9fd959
9 changed files with 32 additions and 31 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.4.6beta06 - February 28, 2011 Libpng 1.4.6beta06 - March 8, 2011
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.
@ -49,8 +49,9 @@ version 1.4.6beta05 [January 23, 2011]
Fixed a typo in the *.def files and deleted entries that are now Fixed a typo in the *.def files and deleted entries that are now
declared in pngpriv.h declared in pngpriv.h
version 1.4.6beta06 [February 28, 2011] version 1.4.6beta06 [March 8, 2011]
Updated contrib/pngsuite/README to add the word "modify". Updated contrib/pngsuite/README to add the word "modify".
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Send comments/corrections/commendations to glennrp at users.sourceforge.net Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -2761,8 +2761,9 @@ version 1.4.6beta05 [January 23, 2011]
Fixed a typo in the *.def files and deleted entries that are now Fixed a typo in the *.def files and deleted entries that are now
declared in pngpriv.h declared in pngpriv.h
version 1.4.6beta06 [February 28, 2011] version 1.4.6beta06 [March 8, 2011]
Updated contrib/pngsuite/README to add the word "modify". Updated contrib/pngsuite/README to add the word "modify".
Added the private PNG_UNUSED() macro definition in pngpriv.h.
Send comments/corrections/commendations to glennrp at users.sourceforge.net Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit or to png-mng-implement at lists.sf.net (subscription required; visit

12
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions /* png.c - location for general purpose libpng functions
* *
* Last changed in libpng 1.4.6 [January 23, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -541,19 +541,19 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
png_charp PNGAPI png_charp PNGAPI
png_get_copyright(png_const_structp png_ptr) png_get_copyright(png_const_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 #ifdef PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT return PNG_STRING_COPYRIGHT
#else #else
#ifdef __STDC__ #ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \ return ((png_charp) PNG_STRING_NEWLINE \
"libpng version 1.4.6beta06 - January 23, 2011" PNG_STRING_NEWLINE \ "libpng version 1.4.6beta06 - March 8, 2011" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2010 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 ((png_charp) "libpng version 1.4.6beta06 - January 23, 2011\ return ((png_charp) "libpng version 1.4.6beta06 - March 8, 2011\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\ Copyright (c) 1998-2010 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.");
@ -573,7 +573,7 @@ png_charp PNGAPI
png_get_libpng_ver(png_const_structp png_ptr) png_get_libpng_ver(png_const_structp png_ptr)
{ {
/* Version of *.c files used when building libpng */ /* Version of *.c 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_charp) PNG_LIBPNG_VER_STRING); return ((png_charp) PNG_LIBPNG_VER_STRING);
} }
@ -581,7 +581,7 @@ png_charp PNGAPI
png_get_header_ver(png_const_structp png_ptr) png_get_header_ver(png_const_structp png_ptr)
{ {
/* Version of *.h files used when building libpng */ /* 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_charp) PNG_LIBPNG_VER_STRING); return ((png_charp) PNG_LIBPNG_VER_STRING);
} }

View File

@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation /* pngerror.c - stub functions for i/o and memory allocation
* *
* Last changed in libpng 1.4.6 [January 23, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -306,7 +306,7 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
/* Here if not setjmp support or if png_ptr is null. */ /* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT(); PNG_ABORT();
#ifndef PNG_CONSOLE_IO_SUPPORTED #ifndef PNG_CONSOLE_IO_SUPPORTED
error_message = error_message; /* Make compiler happy */ PNG_UNUSED(error_message) /* Make compiler happy */
#endif #endif
} }
@ -352,9 +352,9 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
fprintf(stderr, PNG_STRING_NEWLINE); fprintf(stderr, PNG_STRING_NEWLINE);
} }
#else #else
warning_message = warning_message; /* Make compiler happy */ PNG_UNUSED(warning_message) /* Make compiler happy */
#endif #endif
png_ptr = png_ptr; /* Make compiler happy */ PNG_UNUSED(png_ptr) /* Make compiler happy */
} }
#endif /* PNG_WARNINGS_SUPPORTED */ #endif /* PNG_WARNINGS_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode /* pngpread.c - read a png file in push mode
* *
* Last changed in libpng 1.4.6 [January 23, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1204,7 +1204,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{ {
png_error(png_ptr, "Out of place tEXt"); png_error(png_ptr, "Out of place tEXt");
info_ptr = info_ptr; /* To quiet some compiler warnings */ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
} }
#ifdef PNG_MAX_MALLOC_64K #ifdef PNG_MAX_MALLOC_64K
@ -1302,7 +1302,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{ {
png_error(png_ptr, "Out of place zTXt"); png_error(png_ptr, "Out of place zTXt");
info_ptr = info_ptr; /* To quiet some compiler warnings */ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
} }
#ifdef PNG_MAX_MALLOC_64K #ifdef PNG_MAX_MALLOC_64K
@ -1503,7 +1503,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{ {
png_error(png_ptr, "Out of place iTXt"); png_error(png_ptr, "Out of place iTXt");
info_ptr = info_ptr; /* To quiet some compiler warnings */ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
} }
#ifdef PNG_MAX_MALLOC_64K #ifdef PNG_MAX_MALLOC_64K
@ -1637,8 +1637,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
) )
#endif #endif
png_chunk_error(png_ptr, "unknown critical chunk"); png_chunk_error(png_ptr, "unknown critical chunk");
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
info_ptr = info_ptr; /* To quiet some compiler warnings */
} }
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED

View File

@ -1,7 +1,7 @@
/* pngread.c - read a PNG file /* pngread.c - read a PNG file
* *
* Last changed in libpng 1.4.6 [January 14, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1337,8 +1337,8 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* Read rest of file, and get additional chunks in info_ptr - REQUIRED */ /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr); png_read_end(png_ptr, info_ptr);
transforms = transforms; /* Quiet compiler warnings */ PNG_UNUSED(transforms) /* Quiet compiler warnings */
params = params; PNG_UNUSED(params)
} }
#endif /* PNG_INFO_IMAGE_SUPPORTED */ #endif /* PNG_INFO_IMAGE_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file /* pngrutil.c - utilities to read a PNG file
* *
* Last changed in libpng 1.4.6 [January 23, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -703,7 +703,7 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
} }
png_crc_finish(png_ptr, length); png_crc_finish(png_ptr, length);
info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */ PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
} }
#ifdef PNG_READ_gAMA_SUPPORTED #ifdef PNG_READ_gAMA_SUPPORTED
@ -2505,7 +2505,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, skip); png_crc_finish(png_ptr, skip);
#ifndef PNG_READ_USER_CHUNKS_SUPPORTED #ifndef PNG_READ_USER_CHUNKS_SUPPORTED
info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */ PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
#endif #endif
} }
@ -2961,7 +2961,7 @@ png_do_read_interlace(png_structp png_ptr)
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width); row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width);
} }
#ifndef PNG_READ_PACKSWAP_SUPPORTED #ifndef PNG_READ_PACKSWAP_SUPPORTED
transformations = transformations; /* Silence compiler warning */ PNG_UNUSED(transformations) /* Silence compiler warning */
#endif #endif
} }
#endif /* PNG_READ_INTERLACING_SUPPORTED */ #endif /* PNG_READ_INTERLACING_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng /* pngtest.c - a simple test program to test libpng
* *
* Last changed in libpng 1.4.6 [January 14, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -387,7 +387,7 @@ static void
pngtest_flush(png_structp png_ptr) pngtest_flush(png_structp png_ptr)
{ {
/* Do nothing; fflush() is said to be just a waste of energy. */ /* Do nothing; fflush() is said to be just a waste of energy. */
png_ptr = png_ptr; /* Stifle compiler warning */ PNG_UNUSED(png_ptr) /* Stifle compiler warning */
} }
#endif #endif

View File

@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file /* pngwrite.c - general routines to write a PNG file
* *
* Last changed in libpng 1.4.6 [January 14, 2011] * Last changed in libpng 1.4.6 [March 8, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1451,8 +1451,8 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
/* It is REQUIRED to call this to finish writing the rest of the file */ /* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr); png_write_end(png_ptr, info_ptr);
transforms = transforms; /* Quiet compiler warnings */ PNG_UNUSED(transforms) /* Quiet compiler warnings */
params = params; PNG_UNUSED(params)
} }
#endif #endif
#endif /* PNG_WRITE_SUPPORTED */ #endif /* PNG_WRITE_SUPPORTED */