From 603c9fd959d6d94c43a2d40f722d47919bd56d37 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 8 Mar 2011 11:33:28 -0600 Subject: [PATCH] [master] Added the private PNG_UNUSED() macro definition in pngpriv.h. --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- png.c | 12 ++++++------ pngerror.c | 8 ++++---- pngpread.c | 11 +++++------ pngread.c | 6 +++--- pngrutil.c | 8 ++++---- pngtest.c | 4 ++-- pngwrite.c | 6 +++--- 9 files changed, 32 insertions(+), 31 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index bb7872730..704eb92c2 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -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 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 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". + Added the private PNG_UNUSED() macro definition in pngpriv.h. Send comments/corrections/commendations to glennrp at users.sourceforge.net or to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 9728e72be..c60235c60 100644 --- a/CHANGES +++ b/CHANGES @@ -2761,8 +2761,9 @@ version 1.4.6beta05 [January 23, 2011] Fixed a typo in the *.def files and deleted entries that are now 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". + Added the private PNG_UNUSED() macro definition in pngpriv.h. Send comments/corrections/commendations to glennrp at users.sourceforge.net or to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.c b/png.c index fb241c02b..fd9898811 100644 --- a/png.c +++ b/png.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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_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 return PNG_STRING_COPYRIGHT #else #ifdef __STDC__ 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) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE); #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) 1996-1997 Andreas Dilger\ 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) { /* 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); } @@ -581,7 +581,7 @@ png_charp PNGAPI png_get_header_ver(png_const_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_charp) PNG_LIBPNG_VER_STRING); } diff --git a/pngerror.c b/pngerror.c index aede2fd9d..c196b11ce 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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. */ PNG_ABORT(); #ifndef PNG_CONSOLE_IO_SUPPORTED - error_message = error_message; /* Make compiler happy */ + PNG_UNUSED(error_message) /* Make compiler happy */ #endif } @@ -352,9 +352,9 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message) fprintf(stderr, PNG_STRING_NEWLINE); } #else - warning_message = warning_message; /* Make compiler happy */ + PNG_UNUSED(warning_message) /* Make compiler happy */ #endif - png_ptr = png_ptr; /* Make compiler happy */ + PNG_UNUSED(png_ptr) /* Make compiler happy */ } #endif /* PNG_WARNINGS_SUPPORTED */ diff --git a/pngpread.c b/pngpread.c index fa4d3b117..a2d8dbf6e 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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)) { 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 @@ -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)) { 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 @@ -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)) { 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 @@ -1637,8 +1637,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 ) #endif png_chunk_error(png_ptr, "unknown critical chunk"); - - info_ptr = info_ptr; /* To quiet some compiler warnings */ + PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ } #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED diff --git a/pngread.c b/pngread.c index b2c73914e..f4a2956bb 100644 --- a/pngread.c +++ b/pngread.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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 */ png_read_end(png_ptr, info_ptr); - transforms = transforms; /* Quiet compiler warnings */ - params = params; + PNG_UNUSED(transforms) /* Quiet compiler warnings */ + PNG_UNUSED(params) } #endif /* PNG_INFO_IMAGE_SUPPORTED */ diff --git a/pngrutil.c b/pngrutil.c index 646e1fc8e..47395a922 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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); - 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 @@ -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); #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 } @@ -2961,7 +2961,7 @@ png_do_read_interlace(png_structp png_ptr) row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width); } #ifndef PNG_READ_PACKSWAP_SUPPORTED - transformations = transformations; /* Silence compiler warning */ + PNG_UNUSED(transformations) /* Silence compiler warning */ #endif } #endif /* PNG_READ_INTERLACING_SUPPORTED */ diff --git a/pngtest.c b/pngtest.c index 3ae78a6eb..c58daf75f 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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) { /* 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 diff --git a/pngwrite.c b/pngwrite.c index 62d1166da..dce38459a 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,7 +1,7 @@ /* 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 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (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 */ png_write_end(png_ptr, info_ptr); - transforms = transforms; /* Quiet compiler warnings */ - params = params; + PNG_UNUSED(transforms) /* Quiet compiler warnings */ + PNG_UNUSED(params) } #endif #endif /* PNG_WRITE_SUPPORTED */