From 910aaadddb4b5d873124d29e41146c373e61bf3a Mon Sep 17 00:00:00 2001 From: John Bowler Date: Tue, 24 Jun 2014 19:38:41 -0500 Subject: [PATCH] [libpng16] Fixed clang no-warning builds: png_digit was defined but never used. --- ANNOUNCE | 7 ++++--- CHANGES | 5 +++-- pngerror.c | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 3c6d18e87..f543c9efb 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.13beta01 - June 24, 2014 +Libpng 1.6.13beta01 - June 25, 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. @@ -26,7 +26,7 @@ Other information: Changes since the last public release (1.6.13): -Version 1.6.13beta01 [June 24, 2014] +Version 1.6.13beta01 [June 25, 2014] Quieted -Wsign-compare and -Wclobber compiler warnings in contrib/pngminus/*.c Added "(void) png_ptr;" where needed in contrib/gregbook to quiet @@ -35,7 +35,8 @@ Version 1.6.13beta01 [June 24, 2014] Added "PNG_SET_OPTION" requirement for sRGB chunk support to pnglibconf.dfa, Needed for write-only support (John Bowler). Changed "if defined(__ARM_NEON__)" to - "if defined(__ARM_NEON__) || defined(__ARM_NEON)" (James Wu). + "if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu). + Fixed clang no-warning builds: png_digit was defined but never used. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index b0a8aec4c..ae4e4f3c7 100644 --- a/CHANGES +++ b/CHANGES @@ -4940,7 +4940,7 @@ Version 1.6.12rc03 [June 8, 2014] Version 1.6.12 [June 12, 2014] No changes. -Version 1.6.13beta01 [June 24, 2014] +Version 1.6.13beta01 [June 25, 2014] Quieted -Wsign-compare and -Wclobber compiler warnings in contrib/pngminus/*.c Added "(void) png_ptr;" where needed in contrib/gregbook to quiet @@ -4949,7 +4949,8 @@ Version 1.6.13beta01 [June 24, 2014] Added "PNG_SET_OPTION" requirement for sRGB chunk support to pnglibconf.dfa, Needed for write-only support (John Bowler). Changed "if defined(__ARM_NEON__)" to - "if defined(__ARM_NEON__) || defined(__ARM_NEON)" (James Wu). + "if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu). + Fixed clang no-warning builds: png_digit was defined but never used. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngerror.c b/pngerror.c index 03dcd7c2f..fdf496540 100644 --- a/pngerror.c +++ b/pngerror.c @@ -415,6 +415,9 @@ png_app_error(png_const_structrp png_ptr, png_const_charp error_message) } #endif /* BENIGN_ERRORS */ +#define PNG_MAX_ERROR_TEXT 196 /* Currently limited be profile_error in png.c */ +#if defined(PNG_WARNINGS_SUPPORTED) || \ + (defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)) /* These utilities are used internally to build an error message that relates * to the current chunk. The chunk name comes from png_ptr->chunk_name, * this is used to prefix the message. The message is limited in length @@ -427,9 +430,6 @@ static PNG_CONST char png_digit[16] = { 'A', 'B', 'C', 'D', 'E', 'F' }; -#define PNG_MAX_ERROR_TEXT 196 /* Currently limited be profile_error in png.c */ -#if defined(PNG_WARNINGS_SUPPORTED) || \ - (defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)) static void /* PRIVATE */ png_format_buffer(png_const_structrp png_ptr, png_charp buffer, png_const_charp error_message)