From: Dmitry V. Levin Date: Mon, 28 Nov 2016 20:55:10 +0000 (+0000) Subject: tests: fix "comparison between signed and unsigned" compilation warnings X-Git-Tag: v4.15~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=447bdc55bf01b2ccc1a8a17b6457062ddb43364e;p=strace tests: fix "comparison between signed and unsigned" compilation warnings * tests/readv.c (main): Cast r_len to int. * tests/preadv2-pwritev2.c (dumpio): Likewise. --- diff --git a/tests/preadv.c b/tests/preadv.c index 2243eb87..fb5d3ad7 100644 --- a/tests/preadv.c +++ b/tests/preadv.c @@ -141,7 +141,7 @@ main(void) r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); - if (rc != (int) LENGTH_OF(w) - r_len) + if (rc != (int) LENGTH_OF(w) - (int) r_len) perror_msg_and_fail("preadv: expected %d, returned %ld", (int) LENGTH_OF(w) - r_len, rc); printf("preadv(%d, [{iov_base=\"%s\", iov_len=%u}" diff --git a/tests/preadv2-pwritev2.c b/tests/preadv2-pwritev2.c index 032ac035..40604b29 100644 --- a/tests/preadv2-pwritev2.c +++ b/tests/preadv2-pwritev2.c @@ -163,7 +163,7 @@ dumpio(void) r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); - if (rc != (int) w_len - r_len) + if (rc != (int) w_len - (int) r_len) perror_msg_and_fail("preadv2: expected %d, returned %ld", (int) w_len - r_len, rc); tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}"