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
+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
/* 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)) {
* 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