diff --git a/ANNOUNCE b/ANNOUNCE index ad1205cab..1a31b0232 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -655,6 +655,8 @@ Version 1.7.0beta42 [November 17, 2014] macro definitions with ifndef guards (Cosmin). Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32. Removed the obsolete $ARCH variable from scripts/makefile.darwin. + Merged clang no-warning fix from libpng-1.6.13: png_digit was defined + but never used in pngerror.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 756035c00..1c9dcf0fe 100644 --- a/CHANGES +++ b/CHANGES @@ -4944,6 +4944,8 @@ Version 1.7.0beta42 [November 17, 2014] macro definitions with ifndef guards (Cosmin). Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32. Removed the obsolete $ARCH variable from scripts/makefile.darwin. + Merged clang no-warning fix from libpng-1.6.13: png_digit was defined + but never used in pngerror.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngerror.c b/pngerror.c index 0a33e8952..b66fc6aef 100644 --- a/pngerror.c +++ b/pngerror.c @@ -415,10 +415,13 @@ png_app_error(png_const_structrp png_ptr, png_const_charp error_message) } #endif /* BENIGN_ERRORS */ +#define PNG_MAX_ERROR_TEXT 196 /* Currently limited by 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 - * to 63 bytes, the name characters are output as hex digits wrapped in [] + * which is used to prefix the message. The message is limited in length + * to 63 bytes. The name characters are output as hex digits wrapped in [] * if the character is invalid. */ #define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97)) @@ -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) @@ -969,5 +969,5 @@ png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg) return result; } -#endif /* SIMPLIFIED READ/WRITE */ +#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */ #endif /* READ || WRITE */