]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
shut up clang analyzer
authorAlan T. DeKok <aland@freeradius.org>
Wed, 19 Jan 2022 16:14:00 +0000 (11:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 19 Jan 2022 16:16:39 +0000 (11:16 -0500)
src/lib/unlang/xlat_expr.c
src/lib/unlang/xlat_priv.h

index 3a3c991aada87f5cef301dde28c63667ae6cb1e8..4ae60121ec0910ffb3ae2d3f8946af3318d4a52c 100644 (file)
@@ -168,8 +168,13 @@ static xlat_action_t xlat_binary_op(TALLOC_CTX *ctx, fr_dcursor_t *out,
        a = fr_dlist_head(in);
        b = fr_dlist_next(in, a);
 
+#ifdef __clang_analyzer__
+       if (!a || !b) retunr XLAT_ACTION_FAIL;
+#else
        fr_assert(a != NULL);
        fr_assert(b != NULL);
+#endif
+
 
        rcode = fr_value_calc_binary_op(dst, dst, FR_TYPE_NULL, a, op, b);
        if (rcode < 0) {
index 646badf11bbb6a23b5d500aecd969dcae9001426..b898299e927b7c9c4fb88a0ccf882eb5763fd8bc 100644 (file)
@@ -165,7 +165,7 @@ typedef struct {
  * For needs_async, if both the parent and the child are needs_async, the parent is
  * needs_async.
  */
-static inline void xlat_flags_merge(xlat_flags_t *parent, xlat_flags_t const *child)
+static inline CC_HINT(nonnull) void xlat_flags_merge(xlat_flags_t *parent, xlat_flags_t const *child)
 {
        parent->needs_async |= child->needs_async;
        parent->needs_resolving |= child->needs_resolving;