summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-10-05 00:51:41 +0000
committerngie <ngie@FreeBSD.org>2015-10-05 00:51:41 +0000
commit51803bd7651c0a4179c4c6c89cf7376a9dc63faf (patch)
tree0a3b4b0acd7329c11f45bfa6675add2aa3eb2a4f /tests
parente3bac3a30a41f56ac36f4791a7df260f2155c8db (diff)
downloadFreeBSD-src-51803bd7651c0a4179c4c6c89cf7376a9dc63faf.zip
FreeBSD-src-51803bd7651c0a4179c4c6c89cf7376a9dc63faf.tar.gz
Fix compilation with -Werror + -Wsigned enabled
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/vm/mmap_test.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/sys/vm/mmap_test.c b/tests/sys/vm/mmap_test.c
index 9df1da3..1d119c2 100644
--- a/tests/sys/vm/mmap_test.c
+++ b/tests/sys/vm/mmap_test.c
@@ -177,8 +177,7 @@ ATF_TC_WITHOUT_HEAD(mmap__dev_zero_private);
ATF_TC_BODY(mmap__dev_zero_private, tc)
{
char *p1, *p2, *p3;
- size_t i;
- int fd;
+ int fd, i;
ATF_REQUIRE((fd = open("/dev/zero", O_RDONLY)) >= 0);
@@ -191,7 +190,7 @@ ATF_TC_BODY(mmap__dev_zero_private, tc)
ATF_REQUIRE(p2 != MAP_FAILED);
for (i = 0; i < getpagesize(); i++)
- ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]);
+ ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%d] is %x", i, p1[i]);
ATF_REQUIRE(memcmp(p1, p2, getpagesize()) == 0);
@@ -214,8 +213,7 @@ ATF_TC_WITHOUT_HEAD(mmap__dev_zero_shared);
ATF_TC_BODY(mmap__dev_zero_shared, tc)
{
char *p1, *p2, *p3;
- size_t i;
- int fd;
+ int fd, i;
ATF_REQUIRE((fd = open("/dev/zero", O_RDWR)) >= 0);
@@ -228,7 +226,7 @@ ATF_TC_BODY(mmap__dev_zero_shared, tc)
ATF_REQUIRE(p2 != MAP_FAILED);
for (i = 0; i < getpagesize(); i++)
- ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%zu] is %x", i, p1[i]);
+ ATF_REQUIRE_EQ_MSG(0, p1[i], "byte at p1[%d] is %x", i, p1[i]);
ATF_REQUIRE(memcmp(p1, p2, getpagesize()) == 0);
OpenPOWER on IntegriCloud