summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorTarmigan Casebolt <tarmigan+git@gmail.com>2009-11-14 13:33:13 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-15 18:24:58 -0800
commit28bea9e53481fddcb12e63d8c049f0ff2917a573 (patch)
tree1f38ad659ae1b5af3ae05b788c4b6bebb49961f5 /merge-recursive.c
parent77097faa5dc3da2947f4a4bdb6f8a7766f4ef89a (diff)
downloadgit-28bea9e53481fddcb12e63d8c049f0ff2917a573.tar.gz
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 <vmiklos@frugalware.org> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index f55b7ebe11..baabe2c356 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -86,6 +86,7 @@ static void flush_output(struct merge_options *o)
}
}
+__attribute__((format (printf, 3, 4)))
static void output(struct merge_options *o, int v, const char *fmt, ...)
{
int len;
@@ -214,7 +215,8 @@ struct tree *write_tree_from_memory(struct merge_options *o)
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];
if (ce_stage(ce))
- output(o, 0, "%d %.*s", ce_stage(ce), ce_namelen(ce), ce->name);
+ output(o, 0, "%d %.*s", ce_stage(ce),
+ (int)ce_namelen(ce), ce->name);
}
return NULL;
}