summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2016-02-11 12:38:42 +0000
committerJunio C Hamano <gitster@pobox.com>2016-02-11 13:23:10 -0800
commitccd045032d1ef1177c1ebf07e59a3a6547ad0e51 (patch)
treec8ba58d6a26b90cc0a899681fac6c99e496ab5e0
parentcc71bf689fad604b589094673d18443ff5afc71c (diff)
downloadgit-ccd045032d1ef1177c1ebf07e59a3a6547ad0e51.tar.gz
builtin/receive-pack.c: 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--builtin/receive-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index f2d6761af6..f11dbe2f79 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -277,8 +277,8 @@ struct command {
char ref_name[FLEX_ARRAY]; /* more */
};
-static void rp_error(const char *err, ...) __attribute__((format (printf, 1, 2)));
-static void rp_warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
+static void rp_error(const char *err, ...) FORMAT_PRINTF(1, 2);
+static void rp_warning(const char *err, ...) FORMAT_PRINTF(1, 2);
static void report_message(const char *prefix, const char *err, va_list params)
{