mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-01 22:24:55 +02:00
- Fixes for clang static analyzer, the missing ; in
edns-subnet/addrtree.c after the assert made clang analyzer produce a failure to analyze it. git-svn-id: file:///svn/unbound/trunk@4538 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
16 February 2018: Wouter
|
||||
- Fixes for clang static analyzer, the missing ; in
|
||||
edns-subnet/addrtree.c after the assert made clang analyzer
|
||||
produce a failure to analyze it.
|
||||
|
||||
13 February 2018: Ralph
|
||||
- Aggressive NSEC tests
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ addrtree_find(struct addrtree *tree, const addrkey_t *addr,
|
||||
/* does this node have data? if yes, see if we have a match */
|
||||
if (node->elem && node->ttl >= now) {
|
||||
/* saved at wrong depth */;
|
||||
log_assert(node->scope >= depth)
|
||||
log_assert(node->scope >= depth);
|
||||
if (depth == node->scope ||
|
||||
(node->scope > sourcemask &&
|
||||
depth == sourcemask)) {
|
||||
|
||||
@@ -189,11 +189,17 @@ void log_vmsg(int pri, const char* type, const char* format, va_list args);
|
||||
* an assertion that is thrown to the logfile.
|
||||
*/
|
||||
#ifdef UNBOUND_DEBUG
|
||||
#ifdef __clang_analyzer__
|
||||
/* clang analyzer needs to know that log_assert is an assertion, otherwise
|
||||
* it could complain about the nullptr the assert is guarding against. */
|
||||
#define log_assert(x) assert(x)
|
||||
#else
|
||||
# define log_assert(x) \
|
||||
do { if(!(x)) \
|
||||
fatal_exit("%s:%d: %s: assertion %s failed", \
|
||||
__FILE__, __LINE__, __func__, #x); \
|
||||
} while(0);
|
||||
#endif
|
||||
#else
|
||||
# define log_assert(x) /*nothing*/
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user