summaryrefslogtreecommitdiff
path: root/pngerror.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2013-11-22 14:58:04 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2013-11-22 14:58:04 -0600
commitc912050a7b6713753c603cc245bc199a0aa7f5d6 (patch)
treed44abecf5336d63836e94cffd262431ee69db2f7 /pngerror.c
parent113213416cff40304cffeb26ffea0d21d7f31405 (diff)
downloadlibpng-c912050a7b6713753c603cc245bc199a0aa7f5d6.tar.gz
[libpng16] Fixed 'minimal' builds. Various obviously useful minimal
configurations don't build because of missing contrib/libtests test programs and overly complex dependencies in scripts/pnglibconf.dfa. This change adds contrib/conftest/*.dfa files that can be used in automatic build scripts to ensure that these configurations continue to build.
Diffstat (limited to 'pngerror.c')
-rw-r--r--pngerror.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/pngerror.c b/pngerror.c
index f469206ee..1895a2406 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -382,6 +382,10 @@ png_benign_error(png_const_structrp png_ptr, png_const_charp error_message)
# endif
png_error(png_ptr, error_message);
}
+
+# ifndef PNG_ERROR_TEXT_SUPPORTED
+ PNG_UNUSED(error_message)
+# endif
}
void /* PRIVATE */
@@ -391,6 +395,10 @@ png_app_warning(png_const_structrp png_ptr, png_const_charp error_message)
png_warning(png_ptr, error_message);
else
png_error(png_ptr, error_message);
+
+# ifndef PNG_ERROR_TEXT_SUPPORTED
+ PNG_UNUSED(error_message)
+# endif
}
void /* PRIVATE */
@@ -400,6 +408,10 @@ png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
png_warning(png_ptr, error_message);
else
png_error(png_ptr, error_message);
+
+# ifndef PNG_ERROR_TEXT_SUPPORTED
+ PNG_UNUSED(error_message)
+# endif
}
#endif /* BENIGN_ERRORS */
@@ -416,7 +428,8 @@ static PNG_CONST char png_digit[16] = {
};
#define PNG_MAX_ERROR_TEXT 196 /* Currently limited be profile_error in png.c */
-#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)
+#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)
@@ -506,6 +519,10 @@ png_chunk_benign_error(png_const_structrp png_ptr, png_const_charp
else
png_chunk_error(png_ptr, error_message);
+
+# ifndef PNG_ERROR_TEXT_SUPPORTED
+ PNG_UNUSED(error_message)
+# endif
}
#endif
#endif /* PNG_READ_SUPPORTED */
@@ -513,6 +530,10 @@ png_chunk_benign_error(png_const_structrp png_ptr, png_const_charp
void /* PRIVATE */
png_chunk_report(png_const_structrp png_ptr, png_const_charp message, int error)
{
+# ifndef PNG_WARNINGS_SUPPORTED
+ PNG_UNUSED(message)
+# endif
+
/* This is always supported, but for just read or just write it
* unconditionally does the right thing.
*/