From d967ceb98bc019d5e710fd885be14e09ed56521e Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 2 Oct 2018 12:32:33 +0000 Subject: [PATCH] Remove that fix, analyzer is for debug with assertions. - Fix clang analyzer for optimize compile analysis. git-svn-id: file:///svn/unbound/trunk@4929 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 - services/authzone.c | 2 +- util/log.h | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index b7d3c5650..1319cb286 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,7 +1,6 @@ 2 October 2018: Wouter - updated contrib/fastrpz.patch to apply for this version - dnscrypt.c removed sizeof to get array bounds. - - Fix clang analyzer for optimize compile analysis. - Fix testlock code to set noreturn on error routine. - Remove unused variable from contrib fastrpz/rpz.c and remove unused diagnostic pragmas that themselves generate warnings diff --git a/services/authzone.c b/services/authzone.c index 4d0dd1b5a..1f29c3ae9 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -2828,7 +2828,7 @@ az_generate_any_answer(struct auth_zone* z, struct regional* region, if(!msg_add_rrset_an(z, region, msg, node, rrset)) return 0; added++; } - if(added == 0 && node->rrsets) { + if(added == 0 && node && node->rrsets) { if(!msg_add_rrset_an(z, region, msg, node, node->rrsets)) return 0; } diff --git a/util/log.h b/util/log.h index f171dabef..f73c0754d 100644 --- a/util/log.h +++ b/util/log.h @@ -201,13 +201,8 @@ void log_vmsg(int pri, const char* type, const char* format, va_list args); } while(0); #endif #else -#ifdef __clang_analyzer__ -/* tell clang analyzer that the code path with !x is not there */ -#define log_assert(x) if(!(x)) fatal_exit("error") -#else # define log_assert(x) /*nothing*/ #endif -#endif #ifdef USE_WINSOCK /** -- 2.47.3