]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
shut up static analyzer
authorAlan T. DeKok <aland@freeradius.org>
Thu, 17 Feb 2022 15:31:45 +0000 (10:31 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 17 Feb 2022 15:31:45 +0000 (10:31 -0500)
src/lib/unlang/xlat_expr.c

index e43a124e0a9e465463eb335d6ba10dd1904f689d..93e5e4e50a542115e7d202cea0b5c927f1d54743 100644 (file)
@@ -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);