only define im_assert_fail() when assertions are enabled.
authorTony Cook <tony@develop-help.com>
Thu, 25 Oct 2012 03:43:29 +0000 (14:43 +1100)
committerTony Cook <tony@develop-help.com>
Sat, 24 Nov 2012 04:05:55 +0000 (15:05 +1100)
error.c

diff --git a/error.c b/error.c
index a782e3a..03a271c 100644 (file)
--- a/error.c
+++ b/error.c
@@ -301,11 +301,15 @@ int i_failed(int code, char const *msg) {
 
 #endif
 
+#ifdef IM_ASSERT
+
 /*
 =item im_assert_fail(file, line, message)
 
 Called when an im_assert() assertion fails.
 
+Only available when Imager is built with assertions.
+
 =cut
 */
 
@@ -316,6 +320,8 @@ im_assert_fail(char const *file, int line, char const *message) {
   abort();
 }
 
+#endif
+
 /*
 =back