From a4c58d92bfee0cf2e35ab1c5e828a6d790108a69 Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Sat, 4 Sep 2010 11:09:57 -0400 Subject: use __attribute__ to catch printf format mistakes Use "__attribute__((format (printf,N,M)))", as is done in git, do catch mistakes in printf-style format strings. Signed-off-by: Mark Lodato --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index ac9276b..5cfdb4f 100644 --- a/cache.h +++ b/cache.h @@ -30,6 +30,7 @@ extern int cache_process(int size, const char *path, const char *key, int ttl, extern int cache_ls(const char *path); /* Print a message to stdout */ +__attribute__((format (printf,1,2))) extern void cache_log(const char *format, ...); extern unsigned long hash_str(const char *str); -- cgit v1.2.1