From 265abbfdcc82973b8bc666e768efbd5051d904be Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 15 Oct 2008 03:57:45 +0000 Subject: [PATCH] libbind:coverity analysis support. [RT #18196] --- lib/bind/include/isc/assertions.h | 7 ++++--- lib/bind/isc/assertions.c | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/bind/include/isc/assertions.h b/lib/bind/include/isc/assertions.h index 9a9b9dec985..4b3335368e8 100644 --- a/lib/bind/include/isc/assertions.h +++ b/lib/bind/include/isc/assertions.h @@ -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 diff --git a/lib/bind/isc/assertions.c b/lib/bind/isc/assertions.c index f1fb2efe957..264670e1075 100644 --- a/lib/bind/isc/assertions.c +++ b/lib/bind/isc/assertions.c @@ -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) -- 2.47.3