From a24f1e254e9dbea80b8173d72e0f75fec25b38a7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 2 May 2006 01:28:02 -0700 Subject: [PATCH] builtin-grep: printf %.*s length is int, not ptrdiff_t. Signed-off-by: Junio C Hamano --- builtin-grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-grep.c b/builtin-grep.c index 4be1514a4..eb821b41b 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, -- 2.26.2