diff options
author | fanquake <fanquake@gmail.com> | 2021-02-17 08:06:47 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-02-17 08:26:42 +0800 |
commit | 7c8e605bf4207d176e3a706f8928fae557e49a24 (patch) | |
tree | af97d299ab4c896ed0fae19dd99fa2398c1777c1 | |
parent | 92fee79dab384acea47bf20741a9847a58253330 (diff) | |
parent | 9cc8e30125df14fe47e21e55ab3bf26f4d416565 (diff) |
Merge #21159: test: fix sign comparison warning in socket tests
9cc8e30125df14fe47e21e55ab3bf26f4d416565 test: fix sign comparison warning in socket tests (fanquake)
Pull request description:
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.
ACKs for top commit:
practicalswift:
cr ACK 9cc8e30125df14fe47e21e55ab3bf26f4d416565
vasild:
ACK 9cc8e30125df14fe47e21e55ab3bf26f4d416565
Tree-SHA512: 7069a4fde5cec01be03f8477fe396e53658f170efbf1d9ef3339d553bb90a2be9f4acd6b348127b14cd2f91426e0cd1fc35d2d3c9f201cf748c0cf50f47e46a5
-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); |