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 <lodatom@gmail.com>
This commit is contained in:
1
cache.h
1
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);
|
||||
|
Reference in New Issue
Block a user