- Fix clang analysis for outside directory build test.

git-svn-id: file:///svn/unbound/trunk@4990 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-11-28 13:34:31 +00:00
parent 3330d5296c
commit cccb5094a4
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,6 @@
28 November 2018: Wouter 28 November 2018: Wouter
- Fix leak in chroot fix for auth-zone. - Fix leak in chroot fix for auth-zone.
- Fix clang analysis for outside directory build test.
27 November 2018: Wouter 27 November 2018: Wouter
- Fix DNS64 to not store intermediate results in cache, this avoids - Fix DNS64 to not store intermediate results in cache, this avoids

View file

@ -50,7 +50,9 @@ compatfiles=`echo "$LIBOBJS" | sed -e 's?..LIBOBJDIR.?compat/?g' -e 's/.U.o/.c/g
if test "$WITH_PYTHONMODULE" = "yes"; then PYTHONMOD_SRC="pythonmod/*.c"; fi if test "$WITH_PYTHONMODULE" = "yes"; then PYTHONMOD_SRC="pythonmod/*.c"; fi
if test ! -z "$WINAPPS"; then WIN_SRC="winrc/*.c"; fi if test ! -z "$WINAPPS"; then WIN_SRC="winrc/*.c"; fi
cd $PRE; cd $srcdir cd $PRE;
odir=`pwd`
cd $srcdir
# check the files in the srcdir # check the files in the srcdir
fail="no" fail="no"
for x in cachedb/*.c daemon/*.c dns64/*.c $DNSCRYPT_SRC $DNSTAP_SRC edns-subnet/*.c ipsecmod/*.c iterator/*.c libunbound/*.c $PYTHONMOD_SRC respip/*.c services/*.c services/*/*.c sldns/*.c smallapp/*.c util/*.c util/*/*.c validator/*.c $WIN_SRC $compatfiles testcode/*.c; do for x in cachedb/*.c daemon/*.c dns64/*.c $DNSCRYPT_SRC $DNSTAP_SRC edns-subnet/*.c ipsecmod/*.c iterator/*.c libunbound/*.c $PYTHONMOD_SRC respip/*.c services/*.c services/*/*.c sldns/*.c smallapp/*.c util/*.c util/*/*.c validator/*.c $WIN_SRC $compatfiles testcode/*.c; do
@ -60,7 +62,8 @@ for x in cachedb/*.c daemon/*.c dns64/*.c $DNSCRYPT_SRC $DNSTAP_SRC edns-subnet/
echo clang --analyze $CPPFLAGS $x echo clang --analyze $CPPFLAGS $x
plist=`basename $x .c`.plist plist=`basename $x .c`.plist
rm -rf $plist rm -rf $plist
clang --analyze $CPPFLAGS $x 2>&1 | tee tmp.$$ #echo "(cd $odir; clang --analyze $CPPFLAGS $srcdir/$x 2>&1 ) | tee tmp.$$"
(cd "$odir"; clang --analyze $CPPFLAGS $srcdir/$x 2>&1 ) | tee tmp.$$
if grep -e warning -e error tmp.$$ >/dev/null; then if grep -e warning -e error tmp.$$ >/dev/null; then
fail="yes" fail="yes"
fails="$fails $x" fails="$fails $x"