summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-22 16:28:14 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-22 16:28:14 -0800
commit82f05d5dd7ec54c4cd30f016c4380b21245e0d63 (patch)
treec81b46f0c28579c06b886074149e9762921a3ddc /merge-recursive.c
parentMerge branch 'tr/maint-merge-ours-clarification' (early part) (diff)
parentCheck the format of more printf-type functions (diff)
downloadtgif-82f05d5dd7ec54c4cd30f016c4380b21245e0d63.tar.xz
Merge branch 'tc/format-attribute'
* tc/format-attribute: Check the format of more printf-type functions
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;
}