summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-02-03 09:41:50 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-02-03 09:55:17 -0600
commitae48296140a69731a2776c7454e494599212e0c4 (patch)
tree0977ba920aab80ca3616507ff55dba753832dba1
parent0cbe85bcfdfc675a11e992434e6e76b8740e2697 (diff)
downloadlibpng-ae48296140a69731a2776c7454e494599212e0c4.tar.gz
[libpng12] Quiet unused variable warnings from clang by porting PNG_UNUSED()
from libpng-1.4.6.
-rw-r--r--ANNOUNCE40
-rw-r--r--CHANGES6
-rw-r--r--png.c16
-rw-r--r--png.h22
-rw-r--r--pngconf.h14
-rw-r--r--pngerror.c6
-rw-r--r--pngget.c4
-rw-r--r--pngread.c4
-rw-r--r--pngrtran.c2
-rw-r--r--pngrutil.c6
-rw-r--r--pngset.c8
-rw-r--r--pngtest.c4
-rw-r--r--pngwrite.c4
13 files changed, 81 insertions, 55 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index 6e0db8c3a..4c6d0ea58 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.2.51rc02 - January 30, 2014
+Libpng 1.2.51rc03 - February 3, 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.
@@ -9,36 +9,36 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.2.51rc02.tar.xz (LZMA-compressed, recommended)
- libpng-1.2.51rc02.tar.gz
- libpng-1.2.51rc02.tar.bz2
+ libpng-1.2.51rc03.tar.xz (LZMA-compressed, recommended)
+ libpng-1.2.51rc03.tar.gz
+ libpng-1.2.51rc03.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
- libpng-1.2.51rc02-no-config.tar.xz (LZMA-compressed, recommended)
- libpng-1.2.51rc02-no-config.tar.gz
- libpng-1.2.51rc02-no-config.tar.bz2
+ libpng-1.2.51rc03-no-config.tar.xz (LZMA-compressed, recommended)
+ libpng-1.2.51rc03-no-config.tar.gz
+ libpng-1.2.51rc03-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lp1251r02.zip
- lp1251r02.7z
- lp1251r02.tar.bz2
+ lp1251r03.zip
+ lp1251r03.7z
+ lp1251r03.tar.bz2
Project files
- libpng-1.2.51rc02-project-netware.zip
- libpng-1.2.51rc02-project-wince.zip
+ libpng-1.2.51rc03-project-netware.zip
+ libpng-1.2.51rc03-project-wince.zip
Other information:
- libpng-1.2.51rc02-README.txt
- libpng-1.2.51rc02-KNOWNBUGS.txt
- libpng-1.2.51rc02-LICENSE.txt
- libpng-1.2.51rc02-Y2K-compliance.txt
- libpng-1.2.51rc02-[previous version]-diff.txt
+ libpng-1.2.51rc03-README.txt
+ libpng-1.2.51rc03-KNOWNBUGS.txt
+ libpng-1.2.51rc03-LICENSE.txt
+ libpng-1.2.51rc03-Y2K-compliance.txt
+ libpng-1.2.51rc03-[previous version]-diff.txt
Changes since the last public release (1.2.50):
@@ -69,6 +69,12 @@ version 1.2.51rc01 [January 28, 2014]
version 1.2.51rc02 [January 30, 2014]
Quiet an uninitialized memory warning from VC2013 in png_get_png().
+version 1.2.51rc03 [February 3, 2014]
+ Quiet unused variable warnings from clang by porting PNG_UNUSED() from 1.4.6.
+
+version 1.0.61 and 1.2.51 [February 3, 2014]
+ No changes.
+
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
diff --git a/CHANGES b/CHANGES
index dc3112853..5fc450b4d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2804,6 +2804,12 @@ version 1.2.51rc01 [January 28, 2014]
version 1.2.51rc02 [January 30, 2014]
Quiet an uninitialized memory warning from VC2013 in png_get_png().
+version 1.2.51rc03 [February 3, 2014]
+ Quiet unused variable warnings from clang by porting PNG_UNUSED() from 1.4.6.
+
+version 1.0.61 and 1.2.51 [February 3, 2014]
+ No changes.
+
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
diff --git a/png.c b/png.c
index 2b538e46b..e2046f891 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.2.51 [January 30, 2014]
+ * Last changed in libpng 1.2.51 [February 3, 2014]
* 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.)
@@ -17,7 +17,7 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_51rc02 Your_png_h_is_not_version_1_2_51rc02;
+typedef version_1_2_51rc03 Your_png_h_is_not_version_1_2_51rc03;
/* Version information for C files. This had better match the version
* string defined in png.h.
@@ -718,19 +718,19 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
png_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
#else
#ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
- "libpng version 1.2.51rc02 - January 30, 2014" PNG_STRING_NEWLINE \
+ "libpng version 1.2.51rc03 - February 3, 2014" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 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.2.51rc02 - January 30, 2014\
+ return ((png_charp) "libpng version 1.2.51rc03 - February 3, 2014\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
@@ -750,7 +750,7 @@ png_charp PNGAPI
png_get_libpng_ver(png_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);
}
@@ -758,7 +758,7 @@ png_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_charp) PNG_LIBPNG_VER_STRING);
}
@@ -766,7 +766,7 @@ png_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_charp) PNG_HEADER_VERSION_STRING
#ifndef PNG_READ_SUPPORTED
diff --git a/png.h b/png.h
index f9d883131..1331a7f3e 100644
--- a/png.h
+++ b/png.h
@@ -1,6 +1,6 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.2.51rc02 - January 30, 2014
+ * libpng version 1.2.51rc03 - February 3, 2014
* 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.)
@@ -10,7 +10,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.2.51rc02 - January 30, 2014: Glenn
+ * libpng versions 0.97, January 1998, through 1.2.51rc03 - February 3, 2014: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -285,7 +285,9 @@
* 1.0.60 10 10060 10.so.0.60[.0]
* 1.2.50 13 10250 12.so.0.50[.0]
* 1.2.51beta01-05 13 10251 12.so.0.51[.0]
- * 1.2.51rc01-02 13 10251 12.so.0.51[.0]
+ * 1.2.51rc01-03 13 10251 12.so.0.51[.0]
+ * 1.0.61 10 10061 10.so.0.61[.0]
+ * 1.2.51 13 10251 12.so.0.51[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -317,7 +319,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.2.51rc02, January 30, 2014, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.2.51rc03, February 3, 2014, are
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -429,13 +431,13 @@
* Y2K compliance in libpng:
* =========================
*
- * January 30, 2014
+ * February 3, 2014
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.2.51rc02 are Y2K compliant. It is my belief that earlier
+ * upward through 1.2.51rc03 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -491,9 +493,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.51rc02"
+#define PNG_LIBPNG_VER_STRING "1.2.51rc03"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.2.51rc02 - January 30, 2014\n"
+ " libpng version 1.2.51rc03 - February 3, 2014\n"
#define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 13
@@ -506,7 +508,7 @@
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
-#define PNG_LIBPNG_VER_BUILD 02
+#define PNG_LIBPNG_VER_BUILD 03
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -1571,7 +1573,7 @@ struct png_struct_def
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef png_structp version_1_2_51rc02;
+typedef png_structp version_1_2_51rc03;
typedef png_struct FAR * FAR * png_structpp;
diff --git a/pngconf.h b/pngconf.h
index 9cb12f42d..09eafe515 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.2.51rc02 - January 30, 2014
+ * libpng version 1.2.51rc03 - February 3, 2014
* Copyright (c) 1998-2013 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.)
@@ -86,6 +86,18 @@
#endif
/* End of material added at libpng-1.2.19/1.2.21 */
+/* Added at libpng-1.2.51 (ported from 1.4.6) */
+#ifndef PNG_UNUSED
+/* Unused formal parameter warnings are silenced using the following macro
+ * which is expected to have no bad effects on performance (optimizing
+ * compilers will probably remove it entirely). Note that if you replace
+ * it with something other than whitespace, you must include the terminating
+ * semicolon.
+ */
+# define PNG_UNUSED(param) (void)param;
+#endif
+/* End of material added to libpng-1.4.6 */
+
/* This is the size of the compression buffer, and thus the size of
* an IDAT chunk. Make this whatever size you feel is best for your
* machine. One of these will be allocated per png_struct. When this
diff --git a/pngerror.c b/pngerror.c
index 025d52e77..a0bdb2f42 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -300,7 +300,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
}
@@ -346,9 +346,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/pngget.c b/pngget.c
index d397329a5..8f3629c0c 100644
--- a/pngget.c
+++ b/pngget.c
@@ -893,7 +893,7 @@ png_uint_32 PNGAPI
png_get_asm_flagmask (int flag_select)
{
/* Obsolete, to be removed from libpng-1.4.0 */
- flag_select=flag_select;
+ PNG_UNUSED(flag_select)
return 0L;
}
@@ -903,7 +903,7 @@ png_uint_32 PNGAPI
png_get_mmx_flagmask (int flag_select, int *compilerID)
{
/* Obsolete, to be removed from libpng-1.4.0 */
- flag_select=flag_select;
+ PNG_UNUSED(flag_select)
*compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */
return 0L;
}
diff --git a/pngread.c b/pngread.c
index f0a54c1fe..d52c8bdbf 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1500,8 +1500,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/pngrtran.c b/pngrtran.c
index 4ee200b56..9fc79946b 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.2.51 [January 30, 2014]
+ * Last changed in libpng 1.2.51 [February 3, 2014]
* 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.)
diff --git a/pngrutil.c b/pngrutil.c
index 1de7427de..5490d4d86 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -659,7 +659,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
@@ -2465,7 +2465,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
}
@@ -2921,7 +2921,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/pngset.c b/pngset.c
index 4a761bab2..9c5c85b1d 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.2.51 [January 30, 2014]
+ * Last changed in libpng 1.2.51 [February 3, 2014]
* 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.)
@@ -1187,7 +1187,7 @@ png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
if (png_ptr != NULL)
png_ptr->asm_flags = 0;
- asm_flags = asm_flags; /* Quiet the compiler */
+ PNG_UNUSED(asm_flags) /* Quiet the compiler */
}
/* This function was added to libpng 1.2.0 */
@@ -1200,8 +1200,8 @@ png_set_mmx_thresholds (png_structp png_ptr,
if (png_ptr == NULL)
return;
/* Quiet the compiler */
- mmx_bitdepth_threshold = mmx_bitdepth_threshold;
- mmx_rowbytes_threshold = mmx_rowbytes_threshold;
+ PNG_UNUSED(mmx_bitdepth_threshold)
+ PNG_UNUSED(mmx_rowbytes_threshold)
}
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
diff --git a/pngtest.c b/pngtest.c
index 9c1ae770a..4a7b21fba 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -382,7 +382,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
@@ -1702,4 +1702,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_51rc02 your_png_h_is_not_version_1_2_51rc02;
+typedef version_1_2_51rc03 your_png_h_is_not_version_1_2_51rc03;
diff --git a/pngwrite.c b/pngwrite.c
index 1d8c53f92..e65dbc617 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1586,8 +1586,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 */