From d8a1eef7a3926a2c4f11e44e3970a22c2ea668e5 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 9 Aug 2017 17:13:56 -0700 Subject: [PATCH] Tidy up some test warnings --- CHANGELOG.md | 1 + include/boost/beast/core/detail/bind_handler.hpp | 1 + include/boost/beast/websocket/impl/accept.ipp | 2 +- include/boost/beast/websocket/teardown.hpp | 2 ++ test/bench/wsload/wsload.cpp | 8 ++------ 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6fba62a..a1b85240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Version 104: * Use #error in config.hpp * Only set -std=c++11 on Travis * Only set /permissive- on Appveyor +* Tidy up some test warnings -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/detail/bind_handler.hpp b/include/boost/beast/core/detail/bind_handler.hpp index ed6b6aab..5a2ceafe 100644 --- a/include/boost/beast/core/detail/bind_handler.hpp +++ b/include/boost/beast/core/detail/bind_handler.hpp @@ -45,6 +45,7 @@ private: Arg&&>::type extract(Arg&& arg, Vals& vals) { + boost::ignore_unused(vals); return arg; } diff --git a/include/boost/beast/websocket/impl/accept.ipp b/include/boost/beast/websocket/impl/accept.ipp index 14a7a997..39013a81 100644 --- a/include/boost/beast/websocket/impl/accept.ipp +++ b/include/boost/beast/websocket/impl/accept.ipp @@ -90,7 +90,7 @@ public: } friend - bool asio_handler_is_continuation(response_op* op) + bool asio_handler_is_continuation(response_op*) { // VFALCO This will go away in Net-TS return false; diff --git a/include/boost/beast/websocket/teardown.hpp b/include/boost/beast/websocket/teardown.hpp index 4889287c..0feacbde 100644 --- a/include/boost/beast/websocket/teardown.hpp +++ b/include/boost/beast/websocket/teardown.hpp @@ -42,6 +42,7 @@ teardown( Socket& socket, error_code& ec) { + boost::ignore_unused(role, socket, ec); /* If you are trying to use OpenSSL and this goes off, you need to add an include for . @@ -90,6 +91,7 @@ async_teardown( Socket& socket, TeardownHandler&& handler) { + boost::ignore_unused(role, socket, handler); /* If you are trying to use OpenSSL and this goes off, you need to add an include for . diff --git a/test/bench/wsload/wsload.cpp b/test/bench/wsload/wsload.cpp index 7650a05e..76e77e80 100644 --- a/test/bench/wsload/wsload.cpp +++ b/test/bench/wsload/wsload.cpp @@ -91,7 +91,6 @@ fail(boost::system::error_code ec, char const* what) class connection : public std::enable_shared_from_this { - std::ostream& log_; ws::stream ws_; tcp::endpoint ep_; std::size_t messages_; @@ -106,15 +105,13 @@ class connection public: connection( - std::ostream& log, asio::io_service& ios, tcp::endpoint const& ep, std::size_t messages, bool deflate, report& rep, test_buffer const& tb) - : log_(log) - , ws_(ios) + : ws_(ios) , ep_(ep) , messages_(messages) , rep_(rep) @@ -286,7 +283,7 @@ main(int argc, char** argv) auto const deflate = static_cast(std::atoi(argv[7])); auto const work = (messages + workers - 1) / workers; test_buffer tb; - for(auto i = trials; i; --i) + for(auto i = trials; i != 0; --i) { report rep; boost::asio::io_service ios{1}; @@ -294,7 +291,6 @@ main(int argc, char** argv) { auto sp = std::make_shared( - dout, ios, tcp::endpoint{address, port}, work,