From: Wouter Wijngaards Date: Tue, 2 Oct 2018 12:42:50 +0000 (+0000) Subject: - clang analyze test is used only when assertions are enabled. X-Git-Tag: release-1.8.2rc1~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c08a2ba550e29371e670a26c53c320aab8192a3;p=thirdparty%2Funbound.git - clang analyze test is used only when assertions are enabled. git-svn-id: file:///svn/unbound/trunk@4930 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 1319cb286..2eb32d5a0 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -4,6 +4,7 @@ - Fix testlock code to set noreturn on error routine. - Remove unused variable from contrib fastrpz/rpz.c and remove unused diagnostic pragmas that themselves generate warnings + - clang analyze test is used only when assertions are enabled. 1 October 2018: Wouter - tag for release 1.8.1rc1. diff --git a/testdata/clang-analysis.tdir/clang-analysis.test b/testdata/clang-analysis.tdir/clang-analysis.test index de29bb525..fc5f000a5 100644 --- a/testdata/clang-analysis.tdir/clang-analysis.test +++ b/testdata/clang-analysis.tdir/clang-analysis.test @@ -6,11 +6,21 @@ # common functions . ../common.sh +PRE="../.." if test ! -x "`which clang 2>&1`"; then echo "No clang in path" exit 0 fi #echo "have clang" +# test if assertions are enabled +if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then + : +else + echo "UNBOUND_DEBUG is not enabled, skip test" + # no unbound debug means no assertions, and clang analyzer uses + # the assertions to make inferences. + exit 0 +fi # read value from Makefile # $1: result variable name @@ -23,7 +33,6 @@ read_value () { #echo $1"="'"'"`eval echo '$'$1`"'"' } -PRE="../.." # read some values from the Makefile read_value srcdir '^srcdir=' $PRE/Makefile read_value CPPFLAGS '^CPPFLAGS=' $PRE/Makefile