aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-03-23 14:16:31 +0100
committerFabian Groffen <grobian@gentoo.org>2018-03-23 14:16:31 +0100
commitbf111d7d5464f8a6b3a251d3d12fe9e39357bc6e (patch)
treebb50841005853e42bf1d60fb5045d3a253ece4d2 /qgrep.c
parentgetline: fix comparison of integers of different signs (diff)
downloadportage-utils-bf111d7d5464f8a6b3a251d3d12fe9e39357bc6e.tar.gz
portage-utils-bf111d7d5464f8a6b3a251d3d12fe9e39357bc6e.tar.bz2
portage-utils-bf111d7d5464f8a6b3a251d3d12fe9e39357bc6e.zip
fix signedness warnings
Diffstat (limited to 'qgrep.c')
-rw-r--r--qgrep.c5
1 files changed, 3 insertions, 2 deletions
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;