summaryrefslogtreecommitdiffstats
path: root/src/lib/asiolink/tests
diff options
context:
space:
mode:
authorAndrei Pavel <andrei@isc.org>2021-08-12 12:20:46 +0200
committerAndrei Pavel <andrei@isc.org>2021-08-17 08:31:05 +0200
commit3651cd22a26d42af4fe8598c4a4eab37a4a3a9e0 (patch)
treecd7f90ec2332549d05942f8990aaabc76d486481 /src/lib/asiolink/tests
parent[#2025] fix g++ warnings (diff)
downloadkea-3651cd22a26d42af4fe8598c4a4eab37a4a3a9e0.tar.xz
kea-3651cd22a26d42af4fe8598c4a4eab37a4a3a9e0.zip
[#2025] fix Wunused-parameter warnings
Diffstat (limited to 'src/lib/asiolink/tests')
-rw-r--r--src/lib/asiolink/tests/tcp_acceptor_unittest.cc5
-rw-r--r--src/lib/asiolink/tests/tls_acceptor_unittest.cc3
-rw-r--r--src/lib/asiolink/tests/unix_domain_socket_unittest.cc6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/asiolink/tests/tcp_acceptor_unittest.cc b/src/lib/asiolink/tests/tcp_acceptor_unittest.cc
index d674146fd3..5a925cca4e 100644
--- a/src/lib/asiolink/tests/tcp_acceptor_unittest.cc
+++ b/src/lib/asiolink/tests/tcp_acceptor_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2016-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2021 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -46,7 +46,8 @@ public:
/// @param length Length of received data.
void operator()(boost::system::error_code ec, size_t length = 0) {
if (ec) {
- ADD_FAILURE() << "error occurred for a socket: " << ec.message();
+ ADD_FAILURE() << "error occurred for a socket with data of length "
+ << length << ": " << ec.message();
}
}
diff --git a/src/lib/asiolink/tests/tls_acceptor_unittest.cc b/src/lib/asiolink/tests/tls_acceptor_unittest.cc
index 06f06311a9..d9d9ccdd90 100644
--- a/src/lib/asiolink/tests/tls_acceptor_unittest.cc
+++ b/src/lib/asiolink/tests/tls_acceptor_unittest.cc
@@ -47,7 +47,8 @@ public:
/// @param length Length of received data.
void operator()(boost::system::error_code ec, size_t length = 0) {
if (ec) {
- ADD_FAILURE() << "error occurred for a socket: " << ec.message();
+ ADD_FAILURE() << "error occurred for a socket with data of length "
+ << length << ": " << ec.message();
}
}
diff --git a/src/lib/asiolink/tests/unix_domain_socket_unittest.cc b/src/lib/asiolink/tests/unix_domain_socket_unittest.cc
index a147e3bb8c..31c573dd53 100644
--- a/src/lib/asiolink/tests/unix_domain_socket_unittest.cc
+++ b/src/lib/asiolink/tests/unix_domain_socket_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2021 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -267,7 +267,7 @@ TEST_F(UnixDomainSocketTest, asyncClientErrors) {
bool send_handler_invoked = false;
socket.asyncSend(outbound_data.c_str(), outbound_data.size(),
[&send_handler_invoked]
- (const boost::system::error_code& ec, size_t length) {
+ (const boost::system::error_code& ec, size_t /* length */) {
send_handler_invoked = true;
EXPECT_TRUE(ec);
});
@@ -280,7 +280,7 @@ TEST_F(UnixDomainSocketTest, asyncClientErrors) {
std::array<char, 1024> read_buf;
socket.asyncReceive(&read_buf[0], read_buf.size(),
[&receive_handler_invoked]
- (const boost::system::error_code& ec, size_t length) {
+ (const boost::system::error_code& ec, size_t /* length */) {
receive_handler_invoked = true;
EXPECT_TRUE(ec);
});