From 0f6303301f1fe89618497cf3d1887f1a3f67ea2e Mon Sep 17 00:00:00 2001 From: John Bowler Date: Fri, 22 Nov 2013 18:49:58 -0600 Subject: [PATCH] [libpng16] Fixed pngvalid 'fail' function declaration on the Intel C Compiler. This reverts to the previous 'static' implementation and works round the 'unused static function' warning by using PNG_UNUSED(). --- ANNOUNCE | 7 +++++-- CHANGES | 5 ++++- contrib/libtests/pngvalid.c | 11 ++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 61f5837f2..23b25c5a1 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.8beta01 - November 22, 2013 +Libpng 1.6.8beta01 - November 23, 2013 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. @@ -26,7 +26,7 @@ Other information: Changes since the last public release (1.6.7): -Version 1.6.8beta01 [November 22, 2013] +Version 1.6.8beta01 [November 23, 2013] Changed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED in pngpread.c to #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED to be consistent with what is in pngpriv.h. @@ -40,6 +40,9 @@ Version 1.6.8beta01 [November 22, 2013] contrib/conftest/*.dfa files that can be used in automatic build scripts to ensure that these configurations continue to build. Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder. + Fixed pngvalid 'fail' function declaration on the Intel C Compiler. + This reverts to the previous 'static' implementation and works round + the 'unused static function' warning by using PNG_UNUSED(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index e4b5e7aff..02b134dd7 100644 --- a/CHANGES +++ b/CHANGES @@ -4713,7 +4713,7 @@ Version 1.6.7rc02 [November 7, 2013] Version 1.6.7 [November 14, 2013] -Version 1.6.8beta01 [November 22, 2013] +Version 1.6.8beta01 [November 23, 2013] Moved prototype for png_handle_unknown() in pngpriv.h outside of the #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED/#endif block. Added "-Wall" to CFLAGS in contrib/pngminim/*/makefile @@ -4725,6 +4725,9 @@ Version 1.6.8beta01 [November 22, 2013] contrib/conftest/*.dfa files that can be used in automatic build scripts to ensure that these configurations continue to build. Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder. + Fixed pngvalid 'fail' function declaration on the Intel C Compiler. + This reverts to the previous 'static' implementation and works round + the 'unused static function' warning by using PNG_UNUSED(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index d60d4dfa7..c106b2bb4 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -1953,11 +1953,9 @@ typedef struct png_modifier } png_modifier; /* This returns true if the test should be stopped now because it has already - * failed and it is running silently. It is not static simply to avoid having - * to special case it on all the #ifdefs on which it depends. - */ -extern int fail(png_modifier *pm); -/*static*/ int fail(png_modifier *pm) + * failed and it is running silently. + */ +static int fail(png_modifier *pm) { return !pm->log && !pm->this.verbose && (pm->this.nerrors > 0 || (pm->this.treat_warnings_as_errors && pm->this.nwarnings > 0)); @@ -10267,6 +10265,9 @@ int main(int argc, char **argv) } } + /* This is required because some very minimal configurations do not use it: + */ + UNUSED(fail) return 0; } #else /* write or low level APIs not supported */ -- GitLab