]> 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:21 +0000 (03:57 +0000)
committerMark Andrews <marka@isc.org>
Wed, 15 Oct 2008 03:57:21 +0000 (03:57 +0000)
lib/bind/include/isc/assertions.h
lib/bind/isc/assertions.c

index 2ed768dcaec466d851669eadb8c2e1fa3e4c2f17..100e586658b09fab5b9e248283dae19734bbb634 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- * $Id: assertions.h,v 1.2.18.1 2005/04/27 05:00:50 sra Exp $
+ * $Id: assertions.h,v 1.2.18.2 2008/10/15 03:57:21 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 c03464d2b3326bb9159795a85eedf28efad6bf38..e4bd42ab6ed2a53a8b426965c236c6110469be18 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: assertions.c,v 1.2.18.1 2005/04/27 05:01:05 sra Exp $";
+static const char rcsid[] = "$Id: assertions.c,v 1.2.18.2 2008/10/15 03:57:21 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)