From: Alan T. DeKok Date: Thu, 17 Feb 2022 15:31:45 +0000 (-0500) Subject: shut up static analyzer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6009ca4a54a3784b07d4424d8590d886efcdf28;p=thirdparty%2Ffreeradius-server.git shut up static analyzer --- diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index e43a124e0a9..93e5e4e50a5 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -119,7 +119,7 @@ static fr_slen_t xlat_expr_print_binary(fr_sbuff_t *out, xlat_exp_t const *node, /** Basic purify, but only for expressions and comparisons. * */ -static int xlat_purify_expr(xlat_exp_t *node) +static int CC_HINT(nonnull) xlat_purify_expr(xlat_exp_t *node) { int rcode = -1; xlat_t const *func; @@ -1105,7 +1105,12 @@ done: node = unary; } +#ifdef __clang_analyzer__ + if (!node) return 0; /* shut up stupid analyzer */ +#else fr_assert(node != NULL); +#endif + *head = node; xlat_flags_merge(flags, &node->flags);