From: Elia Pinto <gitter.spiros@gmail.com>
To: git@vger.kernel.org
Cc: Elia Pinto <gitter.spiros@gmail.com>
Subject: [PATCH 08/22] cache.h: use the FORMATPRINTF macro to declare the gcc function attribute 'format printf'
Date: Thu, 11 Feb 2016 12:38:45 +0000 [thread overview]
Message-ID: <1455194339-859-9-git-send-email-gitter.spiros@gmail.com> (raw)
In-Reply-To: <1455194339-859-1-git-send-email-gitter.spiros@gmail.com>
Use the new FORMATPRINTF macro (in git-compat-util.h) to declare the gcc function
attribute 'format printf'
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
cache.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/cache.h b/cache.h
index 553b04b..fb29154 100644
--- a/cache.h
+++ b/cache.h
@@ -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, ...) FORMATPRINTF(1,2);
+extern const char *git_path(const char *fmt, ...) FORMATPRINTF(1,2);
extern char *mksnpath(char *buf, size_t n, const char *fmt, ...)
- __attribute__((format (printf, 3, 4)));
+ FORMATPRINTF(3,4);
extern void strbuf_git_path(struct strbuf *sb, const char *fmt, ...)
- __attribute__((format (printf, 2, 3)));
+ FORMATPRINTF(2,3);
extern char *git_path_buf(struct strbuf *buf, const char *fmt, ...)
- __attribute__((format (printf, 2, 3)));
+ FORMATPRINTF(2,3);
extern void strbuf_git_path_submodule(struct strbuf *sb, const char *path,
const char *fmt, ...)
- __attribute__((format (printf, 3, 4)));
+ FORMATPRINTF(3,4);
extern char *git_pathdup(const char *fmt, ...)
- __attribute__((format (printf, 1, 2)));
+ FORMATPRINTF(1,2);
extern char *mkpathdup(const char *fmt, ...)
- __attribute__((format (printf, 1, 2)));
+ FORMATPRINTF(1,2);
extern char *git_pathdup_submodule(const char *path, const char *fmt, ...)
- __attribute__((format (printf, 2, 3)));
+ FORMATPRINTF(2,3);
extern void report_linked_checkout_garbage(void);
@@ -1630,7 +1630,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, ...) FORMATPRINTF(2,3);
extern NORETURN void git_die_config_linenr(const char *key, const char *filename, int linenr);
extern int committer_ident_sufficiently_given(void);
@@ -1643,7 +1643,7 @@ extern const char *git_mailmap_blob;
/* IO helper functions */
extern void maybe_flush_or_die(FILE *, const char *);
-__attribute__((format (printf, 2, 3)))
+FORMATPRINTF(2,3)
extern void fprintf_or_die(FILE *, const char *fmt, ...);
#define COPY_READ_ERROR (-2)
--
2.5.0
next prev parent reply other threads:[~2016-02-11 12:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 12:38 [PATCH 00/22] add the FORMATPRINTF macro to declare the gcc function Elia Pinto
2016-02-11 12:38 ` [PATCH 01/22] git-compat-util.h: add the FORMATPRINTF macro Elia Pinto
2016-02-11 12:38 ` [PATCH 02/22] advice.h: use the FORMATPRINTF macro to declare the gcc function attribute 'format printf' Elia Pinto
2016-02-11 12:38 ` [PATCH 03/22] argv-array.h: " Elia Pinto
2016-02-11 20:53 ` Junio C Hamano
2016-02-11 21:49 ` Junio C Hamano
2016-02-11 12:38 ` [PATCH 04/22] builtin/index-pack.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 05/22] builtin/receive-pack.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 06/22] builtin/update-index.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 07/22] builtin/upload-archive.c: " Elia Pinto
2016-02-11 12:38 ` Elia Pinto [this message]
2016-02-11 12:38 ` [PATCH 09/22] color.h: " Elia Pinto
2016-02-11 12:38 ` [PATCH 10/22] config.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 11/22] daemon.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 12/22] fsck.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 13/22] http-backend.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 14/22] imap-send.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 15/22] merge-recursive.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 16/22] pkt-line.h: " Elia Pinto
2016-02-11 12:38 ` [PATCH 17/22] remote.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 18/22] strbuf.h: " Elia Pinto
2016-02-11 12:38 ` [PATCH 19/22] trace.h: " Elia Pinto
2016-02-11 12:38 ` [PATCH 20/22] transport-helper.c: " Elia Pinto
2016-02-11 12:38 ` [PATCH 21/22] utf8.h: " Elia Pinto
2016-02-11 12:38 ` [PATCH 22/22] wt-status.h: " Elia Pinto
2016-02-11 17:59 ` [PATCH 00/22] add the FORMATPRINTF macro to declare the gcc function Junio C Hamano
2016-02-11 22:33 ` Jeff King
2016-02-18 21:59 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455194339-859-9-git-send-email-gitter.spiros@gmail.com \
--to=gitter.spiros@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).