diff options
author | fanquake <fanquake@gmail.com> | 2021-02-12 10:12:00 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-02-12 10:12:00 +0800 |
commit | 9cc8e30125df14fe47e21e55ab3bf26f4d416565 (patch) | |
tree | 78f17ac974c1dcb18b8b226eabed878ab4a5e514 /src/test | |
parent | 937dfa8398736b3138e3e667679c4878566f2866 (diff) |
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.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/sock_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/sock_tests.cpp b/src/test/sock_tests.cpp index cc0e6e7057..ed9780dfb5 100644 --- a/src/test/sock_tests.cpp +++ b/src/test/sock_tests.cpp @@ -95,7 +95,7 @@ static void CreateSocketPair(int s[2]) static void SendAndRecvMessage(const Sock& sender, const Sock& receiver) { const char* msg = "abcd"; - constexpr size_t msg_len = 4; + constexpr ssize_t msg_len = 4; char recv_buf[10]; BOOST_CHECK_EQUAL(sender.Send(msg, msg_len, 0), msg_len); |