*.h: add a few missing __attribute__((format))

Add missing format attributes to API functions that take printf
arguments.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-07-13 10:05:19 +02:00 committed by Junio C Hamano
parent 48ca53cac4
commit 75d31ceec5
3 changed files with 3 additions and 0 deletions

View File

@ -1385,6 +1385,7 @@ enum get_oid_result {
};
int repo_get_oid(struct repository *r, const char *str, struct object_id *oid);
__attribute__((format (printf, 2, 3)))
int get_oidf(struct object_id *oid, const char *fmt, ...);
int repo_get_oid_commit(struct repository *r, const char *str, struct object_id *oid);
int repo_get_oid_committish(struct repository *r, const char *str, struct object_id *oid);

View File

@ -31,6 +31,7 @@ struct strbuf;
void sq_quote_buf(struct strbuf *, const char *src);
void sq_quote_argv(struct strbuf *, const char **argv);
__attribute__((format (printf, 2, 3)))
void sq_quotef(struct strbuf *, const char *fmt, ...);
/*

View File

@ -263,6 +263,7 @@ static inline void strbuf_insertstr(struct strbuf *sb, size_t pos,
void strbuf_vinsertf(struct strbuf *sb, size_t pos, const char *fmt,
va_list ap);
__attribute__((format (printf, 3, 4)))
void strbuf_insertf(struct strbuf *sb, size_t pos, const char *fmt, ...);
/**