summaryrefslogtreecommitdiff
path: root/http-backend.c
diff options
context:
space:
mode:
authorTarmigan Casebolt <tarmigan+git@gmail.com>2009-11-14 13:10:58 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-15 22:15:01 -0800
commit354870171bc98dfef7dfa037b3fe9ac9454c94a2 (patch)
treebc51a6bbbf5be7ceb4192710dff12832e85c9ecd /http-backend.c
parent48aec1b1f14578ac7560c8be40890ebf52c91d78 (diff)
downloadgit-354870171bc98dfef7dfa037b3fe9ac9454c94a2.tar.gz
http-backend: Let gcc check the format of more printf-type functions.
We already have these checks in many printf-type functions that have prototypes which are in header files. Add these same checks to static functions in http-backend.c Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-backend.c')
-rw-r--r--http-backend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/http-backend.c b/http-backend.c
index 8e08f057dd..f729488fc5 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -108,6 +108,7 @@ static const char *get_parameter(const char *name)
return i ? i->util : NULL;
}
+__attribute__((format (printf, 2, 3)))
static void format_write(int fd, const char *fmt, ...)
{
static char buffer[1024];
@@ -165,6 +166,7 @@ static void end_headers(void)
safe_write(1, "\r\n", 2);
}
+__attribute__((format (printf, 1, 2)))
static NORETURN void not_found(const char *err, ...)
{
va_list params;
@@ -180,6 +182,7 @@ static NORETURN void not_found(const char *err, ...)
exit(0);
}
+__attribute__((format (printf, 1, 2)))
static NORETURN void forbidden(const char *err, ...)
{
va_list params;