From: Junio C Hamano Date: Tue, 2 May 2006 08:28:02 +0000 (-0700) Subject: builtin-grep: printf %.*s length is int, not ptrdiff_t. X-Git-Tag: v1.4.0-rc1~142^2~17 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a24f1e254e9dbea80b8173d72e0f75fec25b38a7;p=git.git builtin-grep: printf %.*s length is int, not ptrdiff_t. Signed-off-by: Junio C Hamano --- diff --git a/builtin-grep.c b/builtin-grep.c index 4be1514a..eb821b41 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -103,7 +103,7 @@ static void show_line(struct grep_opt *opt, const char *bol, const char *eol, printf("%s%c", name, sign); if (opt->linenum) printf("%d%c", lno, sign); - printf("%.*s\n", eol-bol, bol); + printf("%.*s\n", (int)(eol-bol), bol); } static int grep_buffer(struct grep_opt *opt, const char *name,