summaryrefslogtreecommitdiff
path: root/test1.c
diff options
context:
space:
mode:
authorrse <rse>2007-06-14 08:11:52 +0000
committerrse <rse>2007-06-14 08:11:52 +0000
commit0c3ca5c34b809685bba4fd6a360912a8aefa9d12 (patch)
treed5575501ea972b6d5a42b2b29d005b982f7cc8b4 /test1.c
parente21cc5c4d7b94914a48ed41e1c84c19f8e4ee673 (diff)
downloadlibpopt-0c3ca5c34b809685bba4fd6a360912a8aefa9d12.tar.gz
HAVE_MCHECK_H and HAVE_MTRACE are Autoconf AC_DEFINEs. Those are not permitted to be checked directly as values, as their value 1 is just set _IF_ the variable is defined. If the variable is not defined the plain use in an #if clause causes compiler warnings or even errors as this is invalid use. AC_DEFINE always have to be checked with defined() only except we can be sure that it is defined (but even then its value is always 1 and hence no need to check this, too)
Diffstat (limited to 'test1.c')
-rw-r--r--test1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test1.c b/test1.c
index 4819150..b1bf27a 100644
--- a/test1.c
+++ b/test1.c
@@ -185,7 +185,7 @@ int main(int argc, const char ** argv)
int help = 0;
int usage = 0;
-#if HAVE_MCHECK_H && HAVE_MTRACE
+#if defined(HAVE_MCHECK_H) && defined(HAVE_MTRACE)
/*@-moduncon -noeffectuncon@*/
mtrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
/*@=moduncon =noeffectuncon@*/
@@ -269,7 +269,7 @@ int main(int argc, const char ** argv)
exit:
optCon = poptFreeContext(optCon);
-#if HAVE_MCHECK_H && HAVE_MTRACE
+#if defined(HAVE_MCHECK_H) && defined(HAVE_MTRACE)
/*@-moduncon -noeffectuncon@*/
muntrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
/*@=moduncon =noeffectuncon@*/