- clang analyze test is used only when assertions are enabled.

git-svn-id: file:///svn/unbound/trunk@4930 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-10-02 12:42:50 +00:00
parent d967ceb98b
commit 1c08a2ba55
2 changed files with 11 additions and 1 deletions

View file

@ -4,6 +4,7 @@
- Fix testlock code to set noreturn on error routine. - Fix testlock code to set noreturn on error routine.
- Remove unused variable from contrib fastrpz/rpz.c and - Remove unused variable from contrib fastrpz/rpz.c and
remove unused diagnostic pragmas that themselves generate warnings remove unused diagnostic pragmas that themselves generate warnings
- clang analyze test is used only when assertions are enabled.
1 October 2018: Wouter 1 October 2018: Wouter
- tag for release 1.8.1rc1. - tag for release 1.8.1rc1.

View file

@ -6,11 +6,21 @@
# common functions # common functions
. ../common.sh . ../common.sh
PRE="../.."
if test ! -x "`which clang 2>&1`"; then if test ! -x "`which clang 2>&1`"; then
echo "No clang in path" echo "No clang in path"
exit 0 exit 0
fi fi
#echo "have clang" #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 # read value from Makefile
# $1: result variable name # $1: result variable name
@ -23,7 +33,6 @@ read_value () {
#echo $1"="'"'"`eval echo '$'$1`"'"' #echo $1"="'"'"`eval echo '$'$1`"'"'
} }
PRE="../.."
# read some values from the Makefile # read some values from the Makefile
read_value srcdir '^srcdir=' $PRE/Makefile read_value srcdir '^srcdir=' $PRE/Makefile
read_value CPPFLAGS '^CPPFLAGS=' $PRE/Makefile read_value CPPFLAGS '^CPPFLAGS=' $PRE/Makefile