From 3651cd22a26d42af4fe8598c4a4eab37a4a3a9e0 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Thu, 12 Aug 2021 13:20:46 +0300 Subject: [#2025] fix Wunused-parameter warnings --- src/lib/asiolink/tests/tcp_acceptor_unittest.cc | 5 +++-- src/lib/asiolink/tests/tls_acceptor_unittest.cc | 3 ++- src/lib/asiolink/tests/unix_domain_socket_unittest.cc | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/lib/asiolink/tests') 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 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); }); -- cgit v1.2.3