Skip to content

Commit 9cc8e30

Browse files
committed
test: fix sign comparison warning in socket tests
This fixes: ```bash In file included from test/sock_tests.cpp:10: In file included from /usr/local/include/boost/test/unit_test.hpp:18: In file included from /usr/local/include/boost/test/test_tools.hpp:46: /usr/local/include/boost/test/tools/old/impl.hpp:107:17: warning: comparison of integers of different signs: 'const long' and 'const unsigned long' [-Wsign-compare] return left == right; ~~~~ ^ ~~~~~ ``` which was introduced in #20788.
1 parent 937dfa8 commit 9cc8e30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/sock_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void CreateSocketPair(int s[2])
9595
static void SendAndRecvMessage(const Sock& sender, const Sock& receiver)
9696
{
9797
const char* msg = "abcd";
98-
constexpr size_t msg_len = 4;
98+
constexpr ssize_t msg_len = 4;
9999
char recv_buf[10];
100100

101101
BOOST_CHECK_EQUAL(sender.Send(msg, msg_len, 0), msg_len);

0 commit comments

Comments
 (0)