Skip to content

Commit

Permalink
mailmap: debug: eliminate -Wformat field precision type warning
Browse files Browse the repository at this point in the history
The compiler complains that '*' in fprintf() format "%.*s" should
have type int, but we pass size_t. Fix this.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Eric Sunshine authored and Junio C Hamano committed Jul 15, 2013
1 parent 0939a24 commit a8002a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mailmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit a8002a5

Please sign in to comment.