summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-05-02 08:28:02 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-02 08:28:02 (GMT)
commita24f1e254e9dbea80b8173d72e0f75fec25b38a7 (patch)
tree2078f9382252bd70e17a95b00f55f1e3273274ad
parent1362671f6a716e1a34abbcab43adfb68c7e2fd3b (diff)
downloadgit-a24f1e254e9dbea80b8173d72e0f75fec25b38a7.zip
git-a24f1e254e9dbea80b8173d72e0f75fec25b38a7.tar.gz
git-a24f1e254e9dbea80b8173d72e0f75fec25b38a7.tar.bz2
builtin-grep: printf %.*s length is int, not ptrdiff_t.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--builtin-grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 4be1514..eb821b4 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,