From: Alan T. DeKok Date: Mon, 30 Mar 2026 17:22:32 +0000 (-0400) Subject: add more CC_HINT format / printf specifiers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf3bcdd72aa292b1f499147ef83fdb2ca678d812;p=thirdparty%2Ffreeradius-server.git add more CC_HINT format / printf specifiers --- diff --git a/src/lib/server/tmpl.h b/src/lib/server/tmpl.h index 0cf063fedc7..4f5563cb3e2 100644 --- a/src/lib/server/tmpl.h +++ b/src/lib/server/tmpl.h @@ -1083,7 +1083,7 @@ TALLOC_CTX *tmpl_list_ctx(request_t *request, fr_dict_attr_t const *list); fr_slen_t tmpl_attr_list_from_substr(fr_dict_attr_t const **da_p, fr_sbuff_t *in) CC_HINT(nonnull); -tmpl_t *tmpl_init_printf(tmpl_t *vpt, tmpl_type_t type, fr_token_t quote, char const *fmt, ...) CC_HINT(nonnull(1,4)); +tmpl_t *tmpl_init_printf(tmpl_t *vpt, tmpl_type_t type, fr_token_t quote, char const *fmt, ...) CC_HINT(nonnull(1,4)) CC_HINT(format (printf, 4, 5)); tmpl_t *tmpl_init_shallow(tmpl_t *vpt, tmpl_type_t type, fr_token_t quote, char const *name, ssize_t len, @@ -1157,7 +1157,7 @@ fr_slen_t tmpl_request_ref_list_afrom_substr(TALLOC_CTX *ctx, tmpl_attr_error_t fr_sbuff_t *in); /** @} */ -void tmpl_set_name_printf(tmpl_t *vpt, fr_token_t quote, char const *fmt, ...) CC_HINT(nonnull(1,3)); +void tmpl_set_name_printf(tmpl_t *vpt, fr_token_t quote, char const *fmt, ...) CC_HINT(nonnull(1,3)) CC_HINT(format(printf, 3, 4)); void tmpl_set_name_shallow(tmpl_t *vpt, fr_token_t quote, char const *name, ssize_t len) CC_HINT(nonnull); diff --git a/src/lib/util/proto.h b/src/lib/util/proto.h index f3b78b9d2d6..8843967d1db 100644 --- a/src/lib/util/proto.h +++ b/src/lib/util/proto.h @@ -57,11 +57,11 @@ typedef struct { fr_dict_attr_t const *da[FR_DICT_MAX_TLV_STACK + 1]; //!< The stack. } fr_da_stack_t; -void fr_proto_print(char const *file, int line, char const *fmt, ...) CC_HINT(format (printf, 3, 4)); +void fr_proto_print(char const *file, int line, char const *fmt, ...) CC_HINT(nonnull(1,3)) CC_HINT(format (printf, 3, 4)); -void fr_proto_print_hex_data(char const *file, int line, uint8_t const *data, size_t data_len, char const *fmt, ...); +void fr_proto_print_hex_data(char const *file, int line, uint8_t const *data, size_t data_len, char const *fmt, ...) CC_HINT(nonnull(1,3)); /* no format, as we're printing internal da->name, etc. */ -void fr_proto_print_hex_marker(char const *file, int line, uint8_t const *data, size_t data_len, ssize_t slen, char const *fmt, ...); +void fr_proto_print_hex_marker(char const *file, int line, uint8_t const *data, size_t data_len, ssize_t slen, char const *fmt, ...) CC_HINT(nonnull(1,3)); /* no format, as we're printing internal da->name, etc. */ void *fr_proto_next_encodable(fr_dcursor_t *cursor, void *current, void *uctx);