From: Eric Sunshine Date: Mon, 15 Jul 2013 06:54:11 +0000 (-0400) Subject: mailmap: debug: eliminate -Wformat field precision type warning X-Git-Tag: v1.8.4-rc0~34^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8002a5f0ee19e2a513483e763b8b4a7cdcaa48d;p=git mailmap: debug: eliminate -Wformat field precision type warning The compiler complains that '*' in fprintf() format "%.*s" should have type int, but we pass size_t. Fix this. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- diff --git a/mailmap.c b/mailmap.c index 62d998a37c..4cc6e8128f 100644 --- a/mailmap.c +++ b/mailmap.c @@ -309,7 +309,7 @@ int map_user(struct string_list *map, struct mailmap_entry *me; debug_mm("map_user: map '%.*s' <%.*s>\n", - *namelen, *name, *emaillen, *email); + (int)*namelen, *name, (int)*emaillen, *email); item = lookup_prefix(map, *email, *emaillen); if (item != NULL) { @@ -337,8 +337,8 @@ int map_user(struct string_list *map, *name = mi->name; *namelen = strlen(*name); } - debug_mm("map_user: to '%.*s' <%.*s>\n", *namelen, *name, - *emaillen, *email); + debug_mm("map_user: to '%.*s' <%.*s>\n", (int)*namelen, *name, + (int)*emaillen, *email); return 1; } debug_mm("map_user: --\n");