From: Alan T. DeKok Date: Tue, 7 Dec 2021 20:44:36 +0000 (-0500) Subject: try to shut up compiler X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82952630eb31244e611b69f4e6ebb40c5137e76c;p=thirdparty%2Ffreeradius-server.git try to shut up compiler --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index f5966b9a0ee..3b7a8c740ae 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -1065,6 +1065,7 @@ int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint int rcode = -1; fr_value_box_t one, two; fr_value_box_t out; + fr_binary_op_t func; fr_assert(fr_type_is_leaf(a->type)); fr_assert(fr_type_is_leaf(b->type)); @@ -1216,7 +1217,8 @@ int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint case T_OP_PREPEND: fr_assert(hint != FR_TYPE_NULL); - if (!calc_type[hint]) { + func = calc_type[hint]; + if (!func) { fr_strerror_printf("Cannot perform any operations for destination type %s", fr_table_str_by_value(fr_value_box_type_table, hint, "")); rcode = -1; @@ -1230,7 +1232,7 @@ int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint */ fr_value_box_init(&out, hint, NULL, false); - rcode = calc_type[hint](ctx, &out, a, op, b); + rcode = func(ctx, &out, a, op, b); /* not calc_type[hint], to shut up clang */ if (rcode < 0) goto done; fr_value_box_copy_shallow(NULL, dst, &out);