Use the new FORMATPRINTF macro (in git-compat-util.h) to declare the gcc 
function
attribute 'format printf'

Signed-off-by: Elia Pinto <gitter.spi...@gmail.com>
---
 http-backend.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/http-backend.c b/http-backend.c
index 8870a26..c05e99f 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -58,7 +58,7 @@ static const char *get_parameter(const char *name)
        return i ? i->util : NULL;
 }
 
-__attribute__((format (printf, 2, 3)))
+FORMATPRINTF(2,3)
 static void format_write(int fd, const char *fmt, ...)
 {
        static char buffer[1024];
@@ -116,7 +116,7 @@ static void end_headers(void)
        write_or_die(1, "\r\n", 2);
 }
 
-__attribute__((format (printf, 1, 2)))
+FORMATPRINTF(1,2)
 static NORETURN void not_found(const char *err, ...)
 {
        va_list params;
@@ -132,7 +132,7 @@ static NORETURN void not_found(const char *err, ...)
        exit(0);
 }
 
-__attribute__((format (printf, 1, 2)))
+FORMATPRINTF(1,2)
 static NORETURN void forbidden(const char *err, ...)
 {
        va_list params;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to