From: James Jones Date: Fri, 28 Jun 2024 15:43:05 +0000 (-0500) Subject: Annotate bogus overflow complaint (CID 1604606) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2265848cb69485989710891016bd115e01f51d91;p=thirdparty%2Ffreeradius-server.git Annotate bogus overflow complaint (CID 1604606) Coverity complains about "mask <<= 1", but mask has an unsigned type, so that's perfectly valid and its behavior defined. --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index 264ce3dd04a..f09bd928f46 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -1330,6 +1330,7 @@ static int calc_ipv4_prefix(UNUSED TALLOC_CTX *ctx, fr_value_box_t *dst, fr_valu if (mask == b->vb_uint32) break; prefix--; + /* coverity[overflow_const] */ mask <<= 1; } fr_assert(prefix > 0);