From bf111d7d5464f8a6b3a251d3d12fe9e39357bc6e Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Fri, 23 Mar 2018 14:16:31 +0100 Subject: fix signedness warnings --- qgrep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qgrep.c') diff --git a/qgrep.c b/qgrep.c index 06800354..fe53ea21 100644 --- a/qgrep.c +++ b/qgrep.c @@ -153,9 +153,10 @@ qgrep_print_line(qgrep_buf_t *current, const char *label, int regexec_flags = 0; while ((*p != '\0') && !regexec(preg, p, 1, &match, regexec_flags)) { if (match.rm_so > 0) - printf("%.*s", match.rm_so, p); + printf("%.*s", (int)match.rm_so, p); if (match.rm_eo > match.rm_so) { - printf("%s%.*s%s", RED, match.rm_eo - match.rm_so, p + match.rm_so, NORM); + printf("%s%.*s%s", RED, (int)(match.rm_eo - match.rm_so), + p + match.rm_so, NORM); p += match.rm_eo; } else { p += match.rm_eo; -- cgit v1.2.3-65-gdbad