From: James Jones Date: Thu, 25 Aug 2022 20:45:33 +0000 (-0500) Subject: Take out nonnull hint on _fr_dbuff_init() for coverity (CIDs below) (#4697) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c25c498d4c9a653bf58454f2e8e519c4090d232;p=thirdparty%2Ffreeradius-server.git Take out nonnull hint on _fr_dbuff_init() for coverity (CIDs below) (#4697) Coverity assumes that the nonnull means we'll dereference the end pointer... so leave it out when coverity runs. CIDs: 1503895, 1503905, 1503907, 1503914, 1503915, 1503924 1503956, 1503970, 1503973, 1503979, 1503980, 1503988 1504000, 1504034, 1504035, 1504039, 1504040, 1504059 --- diff --git a/src/lib/util/dbuff.h b/src/lib/util/dbuff.h index 967f7a2b44d..48890195793 100644 --- a/src/lib/util/dbuff.h +++ b/src/lib/util/dbuff.h @@ -327,7 +327,11 @@ DIAG_OFF(maybe-uninitialized) /** Does the actual work of initialising a dbuff * @private */ -static inline CC_HINT(nonnull) void _fr_dbuff_init(fr_dbuff_t *out, uint8_t const *start, uint8_t const *end, bool is_const) +static inline +#ifndef __COVERITY__ +CC_HINT(nonnull) +#endif +void _fr_dbuff_init(fr_dbuff_t *out, uint8_t const *start, uint8_t const *end, bool is_const) { if (unlikely(end < start)) end = start; /* Could be an assert? */