From 28bea9e53481fddcb12e63d8c049f0ff2917a573 Mon Sep 17 00:00:00 2001 From: Tarmigan Casebolt Date: Sat, 14 Nov 2009 13:33:13 -0800 Subject: 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 some more prototypes in header functions and to static functions in .c files. cc: Miklos Vajna Signed-off-by: Tarmigan Casebolt Signed-off-by: Junio C Hamano --- cache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 71a731dbc9..ff45269d29 100644 --- a/cache.h +++ b/cache.h @@ -961,7 +961,9 @@ extern void *alloc_object_node(void); extern void alloc_report(void); /* trace.c */ +__attribute__((format (printf, 1, 2))) extern void trace_printf(const char *format, ...); +__attribute__((format (printf, 2, 3))) extern void trace_argv_printf(const char **argv, const char *format, ...); /* convert.c */ -- cgit v1.2.1