git: 505103215ee2 - main - tests/sys/kern/ktls_test: fix -Wsign-compare issue
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 02 Sep 2026 07:39:46 UTC
The branch main has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=505103215ee2e3e31d233b952633e5697ac5da5f
commit 505103215ee2e3e31d233b952633e5697ac5da5f
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-02 07:38:11 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-09-02 07:39:16 +0000
tests/sys/kern/ktls_test: fix -Wsign-compare issue
Cast the size_t quantity used in a comparison to off_t to mute a
`-Wsign-compare` complaint that now occurs after ATF 0.22 [1].
MFC after: 2 weeks
Reported by: clang
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59285
[1]: https://github.com/freebsd/atf/pull/72
---
tests/sys/kern/ktls_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c
index e0bcf17262f2..d3a79aeb1470 100644
--- a/tests/sys/kern/ktls_test.c
+++ b/tests/sys/kern/ktls_test.c
@@ -3011,7 +3011,7 @@ ATF_TC_BODY(ktls_receive_loopback_sendfile, tc)
debug_hexdump(tc, p, payload_len, "shm buffer before");
ATF_REQUIRE_INTEQ(0, sendfile(shm, sockets[1], 0, payload_len, &hdtr,
&sbytes, 0));
- ATF_REQUIRE_INTEQ(sbytes, len);
+ ATF_REQUIRE_INTEQ(sbytes, (off_t)len);
outbuf = calloc(payload_len, 1);