diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-04-08 16:37:54 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-04-13 17:26:20 +0200 |
commit | e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a (patch) | |
tree | 4569f2cdb11d296506a15533e1bebc10fd143b77 /src/test/sock_tests.cpp | |
parent | a1f0b8b62eb851c837a3618583b7c2fd4d12006c (diff) | |
download | bitcoin-e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a.tar.xz |
net: flag relevant Sock methods with [[nodiscard]]
Diffstat (limited to 'src/test/sock_tests.cpp')
-rw-r--r-- | src/test/sock_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/sock_tests.cpp b/src/test/sock_tests.cpp index 400de875b7..9e98f4f0b1 100644 --- a/src/test/sock_tests.cpp +++ b/src/test/sock_tests.cpp @@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE(wait) Sock sock0(s[0]); Sock sock1(s[1]); - std::thread waiter([&sock0]() { sock0.Wait(24h, Sock::RECV); }); + std::thread waiter([&sock0]() { (void)sock0.Wait(24h, Sock::RECV); }); BOOST_REQUIRE_EQUAL(sock1.Send("a", 1, 0), 1); @@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(recv_until_terminator_limit) // BOOST_CHECK_EXCEPTION() writes to some variables shared with the main thread which // creates a data race. So mimic it manually. try { - sock_recv.RecvUntilTerminator('\n', timeout, interrupt, max_data); + (void)sock_recv.RecvUntilTerminator('\n', timeout, interrupt, max_data); } catch (const std::runtime_error& e) { threw_as_expected = HasReason("too many bytes without a terminator")(e); } |