diff options
| author | riastradh <riastradh@NetBSD.org> | 2020-06-30 04:15:46 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2020-06-30 04:15:46 +0000 |
| commit | dc45dca8efeac58c505df58d11bcbdbb0730daab (patch) | |
| tree | 4dc75c0b46a4ffb6220da08ef9ac4a16d2b48a7d /tests/dev | |
| parent | 1c8e0458d983bc2403c63242dcece4d32e4ac940 (diff) | |
Fix sign-compare issue on 32-bit systems.
Built fine on amd64, where all unsigned values are representable in
ssize_t, but I didn't try building on i386, where they're not.
Diffstat (limited to 'tests/dev')
| -rw-r--r-- | tests/dev/cgd/t_cgd_adiantum.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/dev/cgd/t_cgd_adiantum.c b/tests/dev/cgd/t_cgd_adiantum.c index 6f7685a7494..1c1a6d54b65 100644 --- a/tests/dev/cgd/t_cgd_adiantum.c +++ b/tests/dev/cgd/t_cgd_adiantum.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_cgd_adiantum.c,v 1.1 2020/06/29 23:44:01 riastradh Exp $ */ +/* $NetBSD: t_cgd_adiantum.c,v 1.2 2020/06/30 04:15:46 riastradh Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -357,7 +357,7 @@ ATF_TC_BODY(cgd_adiantum, tc) /* read the ciphertext out from the underlying file */ RL(nread = pread(dkfd, buf, C[i].secsize, C[i].blkno * C[i].secsize)); - if (nread != C[i].secsize) { + if ((size_t)nread != C[i].secsize) { atf_tc_fail_nonfatal("truncated read: %zd != %u", nread, C[i].secsize); continue; @@ -375,7 +375,7 @@ ATF_TC_BODY(cgd_adiantum, tc) RL(nread = rump_sys_pread(cgdfd, buf, C[i].secsize, C[i].blkno * C[i].secsize)); RL(unconfigure_cgd(cgdfd)); - if (nread != C[i].secsize) { + if ((size_t)nread != C[i].secsize) { atf_tc_fail_nonfatal("truncated read: %zd != %u", nread, C[i].secsize); continue; |
