path: root/color.h
diff options
authorTarmigan Casebolt <>2009-11-14 21:33:13 (GMT)
committerJunio C Hamano <>2009-11-16 02:24:58 (GMT)
commit28bea9e53481fddcb12e63d8c049f0ff2917a573 (patch)
tree1f38ad659ae1b5af3ae05b788c4b6bebb49961f5 /color.h
parent77097faa5dc3da2947f4a4bdb6f8a7766f4ef89a (diff)
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 <>
Diffstat (limited to 'color.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/color.h b/color.h
index 18abeb7..7d8da6f 100644
--- a/color.h
+++ b/color.h
@@ -29,7 +29,9 @@ int git_color_default_config(const char *var, const char *value, void *cb);
int git_config_colorbool(const char *var, const char *value, int stdout_is_tty);
void color_parse(const char *value, const char *var, char *dst);
void color_parse_mem(const char *value, int len, const char *var, char *dst);
+__attribute__((format (printf, 3, 4)))
int color_fprintf(FILE *fp, const char *color, const char *fmt, ...);
+__attribute__((format (printf, 3, 4)))
int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...);
int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf);