]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
lint, optimize fix.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 14 Jan 2008 10:21:09 +0000 (10:21 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 14 Jan 2008 10:21:09 +0000 (10:21 +0000)
git-svn-id: file:///svn/unbound/trunk@846 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
testcode/unitmain.h

index 978392fe06e71f26a0ddba0abb7c9b8175049388..2e80d4611e6fb84ba498dcacfafc1fef28c3c252 100644 (file)
@@ -3,6 +3,7 @@
        - configure --enable-debug is needed for dependency generation
          for assertions and for compiler warnings.
        - ldns.tgz updated with ldns-trunk (where buffer.h is updated).
+       - fix lint, unit test in optimize mode.
        
 11 January 2008: Wouter
        - man page, warning removed.
index f34d9f797bc276fb42372a4a032e1e66b7268461..f7bb06594ac420ff96d574926461a003508818a1 100644 (file)
 /** number of tests done */
 extern int testcount;
 /** test bool x, exits on failure, increases testcount. */
+#ifdef DEBUG_UNBOUND
 #define unit_assert(x) do {testcount++; log_assert(x);} while(0)
+#else
+#define unit_assert(x) do {testcount++; if(!(x)) { fprintf(stderr, "assertion failure %s:%d\n", __FILE__, __LINE__); exit(1);}} while(0)
+#endif
 
 /** unit test lruhashtable implementation */
 void lruhash_test();