Date: Sun, 26 Oct 2025 02:36:33 GMT From: Lexi Winter <ivy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7ffd190ae9c8 - stable/15 - inet_net_test: Use int to hold expected return values from inet_net_pton Message-ID: <202510260236.59Q2aXY0087248@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=7ffd190ae9c82e4359d8a6f6ae2d1b82e8eb6453 commit 7ffd190ae9c82e4359d8a6f6ae2d1b82e8eb6453 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-10-20 18:31:41 +0000 Commit: Lexi Winter <ivy@FreeBSD.org> CommitDate: 2025-10-26 02:29:57 +0000 inet_net_test: Use int to hold expected return values from inet_net_pton GCC warns about the sign mismatch in comparisons: lib/libc/tests/net/inet_net_test.cc: In member function 'virtual void {anonymous}::atfu_tc_inet_net_inet4::body() const': lib/libc/tests/net/inet_net_test.cc:86:17: error: comparison of integer expressions of different signedness: 'int' and 'const unsigned int' [-Werror=sign-compare] 86 | ATF_REQUIRE_EQ(bits, addr.bits); | ^~~~~~~~~~~~~~ lib/libc/tests/net/inet_net_test.cc: In member function 'virtual void {anonymous}::atfu_tc_inet_net_inet6::body() const': lib/libc/tests/net/inet_net_test.cc:205:17: error: comparison of integer expressions of different signedness: 'int' and 'const unsigned int' [-Werror=sign-compare] 205 | ATF_REQUIRE_EQ(bits, addr.bits); | ^~~~~~~~~~~~~~ Fixes: 8f4a0d2f7b96 ("libc: Import OpenBSD's inet_net_{ntop,pton}") (cherry picked from commit e1aeb58cbbc3839db93ec38ce491b7b9383d5649) --- lib/libc/tests/net/inet_net_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/tests/net/inet_net_test.cc b/lib/libc/tests/net/inet_net_test.cc index 4ecf5a3de492..c4411373165e 100644 --- a/lib/libc/tests/net/inet_net_test.cc +++ b/lib/libc/tests/net/inet_net_test.cc @@ -50,7 +50,7 @@ ATF_TEST_CASE_BODY(inet_net_inet4) struct test_addr { std::string input; - unsigned bits; + int bits; std::string output; }; @@ -134,7 +134,7 @@ ATF_TEST_CASE_BODY(inet_net_inet6) struct test_addr { std::string input; - unsigned bits; + int bits; std::string output; };home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510260236.59Q2aXY0087248>
