]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
libbind:coverity analysis support. [RT #18196]
authorMark Andrews <marka@isc.org>
Wed, 15 Oct 2008 03:57:45 +0000 (03:57 +0000)
committerMark Andrews <marka@isc.org>
Wed, 15 Oct 2008 03:57:45 +0000 (03:57 +0000)
lib/bind/include/isc/assertions.h
lib/bind/isc/assertions.c

index 9a9b9dec985591303c4fd176b805d1888082c45f..4b3335368e871838ce941d8bffd0f4f70b1f496e 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: assertions.h,v 1.1.206.1 2004/03/09 08:33:30 marka Exp $
+ * $Id: assertions.h,v 1.1.206.2 2008/10/15 03:57:45 marka Exp $
  */
 
 #ifndef ASSERTIONS_H
@@ -29,18 +29,19 @@ typedef enum {
 typedef void (*assertion_failure_callback)(const char *, int, assertion_type,
                                           const char *, int);
 
+/* coverity[+kill] */
 extern assertion_failure_callback __assertion_failed;
 void set_assertion_failure_callback(assertion_failure_callback f);
 const char *assertion_type_to_text(assertion_type type);
 
-#ifdef CHECK_ALL
+#if defined(CHECK_ALL) || defined(__COVERITY__)
 #define CHECK_REQUIRE          1
 #define CHECK_ENSURE           1
 #define CHECK_INSIST           1
 #define CHECK_INVARIANT                1
 #endif
 
-#ifdef CHECK_NONE
+#if defined(CHECK_NONE) && !defined(__COVERITY__)
 #define CHECK_REQUIRE          0
 #define CHECK_ENSURE           0
 #define CHECK_INSIST           0
index f1fb2efe95700f6a897a3009b36fdffc2e0f957d..264670e1075e12dcea1b64e61f679857be639654 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: assertions.c,v 1.1.206.1 2004/03/09 08:33:39 marka Exp $";
+static const char rcsid[] = "$Id: assertions.c,v 1.1.206.2 2008/10/15 03:57:45 marka Exp $";
 #endif
 
 #include "port_before.h"
@@ -78,6 +78,7 @@ assertion_type_to_text(assertion_type type) {
  * Private.
  */
 
+/* coverity[+kill] */
 static void
 default_assertion_failed(const char *file, int line, assertion_type type,
                         const char *cond, int print_errno)