diff options
author | Elia Pinto <gitter.spiros@gmail.com> | 2016-02-11 12:38:45 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-11 13:24:09 -0800 |
commit | 7f58249037723512aa14f16b5d18952be3eea7f1 (patch) | |
tree | 9772305105da25b43c5d3ed123a890cc73427d89 | |
parent | b81f80dc8f02d3f13294e0ccd6292bea435eda9b (diff) | |
download | git-7f58249037723512aa14f16b5d18952be3eea7f1.tar.gz |
cache.h: use the FORMAT_PRINTF macro to declare the gcc function attribute 'format printf'
Use the new FORMAT_PRINTF macro (in git-compat-util.h) to declare the gcc function
attribute 'format printf'
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | cache.h | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -763,24 +763,24 @@ extern int check_repository_format(void); * using the safer "dup" or "strbuf" formats below (in some cases, the * unsafe versions have already been removed). */ -extern const char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2))); -extern const char *git_path(const char *fmt, ...) __attribute__((format (printf, 1, 2))); +extern const char *mkpath(const char *fmt, ...) FORMAT_PRINTF(1, 2); +extern const char *git_path(const char *fmt, ...) FORMAT_PRINTF(1, 2); extern char *mksnpath(char *buf, size_t n, const char *fmt, ...) - __attribute__((format (printf, 3, 4))); + FORMAT_PRINTF(3, 4); extern void strbuf_git_path(struct strbuf *sb, const char *fmt, ...) - __attribute__((format (printf, 2, 3))); + FORMAT_PRINTF(2, 3); extern char *git_path_buf(struct strbuf *buf, const char *fmt, ...) - __attribute__((format (printf, 2, 3))); + FORMAT_PRINTF(2, 3); extern void strbuf_git_path_submodule(struct strbuf *sb, const char *path, const char *fmt, ...) - __attribute__((format (printf, 3, 4))); + FORMAT_PRINTF(3, 4); extern char *git_pathdup(const char *fmt, ...) - __attribute__((format (printf, 1, 2))); + FORMAT_PRINTF(1, 2); extern char *mkpathdup(const char *fmt, ...) - __attribute__((format (printf, 1, 2))); + FORMAT_PRINTF(1, 2); extern char *git_pathdup_submodule(const char *path, const char *fmt, ...) - __attribute__((format (printf, 2, 3))); + FORMAT_PRINTF(2, 3); extern void report_linked_checkout_garbage(void); @@ -1638,7 +1638,7 @@ struct key_value_info { int linenr; }; -extern NORETURN void git_die_config(const char *key, const char *err, ...) __attribute__((format(printf, 2, 3))); +extern NORETURN void git_die_config(const char *key, const char *err, ...) FORMAT_PRINTF(2, 3); extern NORETURN void git_die_config_linenr(const char *key, const char *filename, int linenr); extern int committer_ident_sufficiently_given(void); @@ -1651,7 +1651,7 @@ extern const char *git_mailmap_blob; /* IO helper functions */ extern void maybe_flush_or_die(FILE *, const char *); -__attribute__((format (printf, 2, 3))) +FORMAT_PRINTF(2, 3) extern void fprintf_or_die(FILE *, const char *fmt, ...); #define COPY_READ_ERROR (-2) |