]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Remove clang analysis warnings.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 29 Nov 2018 14:39:26 +0000 (14:39 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 29 Nov 2018 14:39:26 +0000 (14:39 +0000)
git-svn-id: file:///svn/unbound/trunk@4998 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
testdata/clang-analysis.tdir/clang-analysis.test
validator/val_neg.c

index 3a121988cebb93d260c482cc3b59a4862010057b..bf96a59f46ffcb34612f86d2f4aee2bb1fd58a5e 100644 (file)
@@ -5,6 +5,7 @@
        - Fix that unbound-checkconf does not complains if the config file
          is not placed inside the chroot.
        - Refuse to start with no ports.
+       - Remove clang analysis warnings.
 
 28 November 2018: Wouter
        - Fix leak in chroot fix for auth-zone.
index d8585d62daaf524f6d02a3290db364a59934c3cd..09c935860c47107ca4239ac340931cecf713fbfc 100644 (file)
@@ -59,6 +59,7 @@ for x in cachedb/*.c daemon/*.c dns64/*.c $DNSCRYPT_SRC $DNSTAP_SRC edns-subnet/
        if test "$x" = "util/configlexer.c"; then continue; fi
        if test "$x" = "util/configparser.c"; then continue; fi
        if test "$x" = "testcode/signit.c"; then continue; fi
+       if test "$x" = "compat/reallocarray.c"; then continue; fi
        echo clang --analyze $CPPFLAGS $x
        plist=`basename $x .c`.plist
        rm -rf $plist
index c494a6be637f45ccd72c819efc3546ad8ca5a9be..4c08e6bbc92f6f83fd2c6a550ad4208874720e6a 100644 (file)
@@ -235,6 +235,7 @@ void neg_delete_data(struct val_neg_cache* neg, struct val_neg_data* el)
 
        /* remove it from the lru list */
        neg_lru_remove(neg, el);
+       log_assert(neg->first != el && neg->last != el);
        
        /* go up the tree and reduce counts */
        p = el;