From 0f932d589bf9502b43aad58aa1a23a0c01a62c5f Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 4 Oct 2019 18:56:06 -0700 Subject: [PATCH] Silence unused variables --- CHANGELOG.md | 6 ++++++ include/boost/beast/core/static_string.hpp | 19 +++++++++---------- include/boost/beast/http/basic_file_body.hpp | 4 ++-- test/beast/core/async_base.cpp | 8 ++++---- test/beast/core/test_handler.hpp | 4 ++-- test/beast/websocket/handshake.cpp | 1 - test/doc/snippets.ipp | 1 + 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ace4d4..0b995b7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 270: + +* Silence unused variables + +-------------------------------------------------------------------------------- + Version 269: * Fix /permissive- missing include diff --git a/include/boost/beast/core/static_string.hpp b/include/boost/beast/core/static_string.hpp index c1cea6c3..9d0e289c 100644 --- a/include/boost/beast/core/static_string.hpp +++ b/include/boost/beast/core/static_string.hpp @@ -828,28 +828,27 @@ private: template void operator+( - static_stringconst& lhs, - static_stringconst& rhs) = delete; + static_stringconst&, + static_stringconst&) = delete; template void -operator+(CharT const* lhs, - static_stringconst& rhs) = delete; +operator+(CharT const*, + static_stringconst&) = delete; template void -operator+(CharT lhs, - static_string const& rhs) = delete; +operator+(CharT, + static_string const&) = delete; template void -operator+(static_string const& lhs, - CharT const* rhs) = delete; +operator+(static_string const&, + CharT const*) = delete; template void -operator+(static_string const& lhs, - CharT rhs) = delete; +operator+(static_string const&, CharT) = delete; // // Non-member functions diff --git a/include/boost/beast/http/basic_file_body.hpp b/include/boost/beast/http/basic_file_body.hpp index 152df889..9d42c9cc 100644 --- a/include/boost/beast/http/basic_file_body.hpp +++ b/include/boost/beast/http/basic_file_body.hpp @@ -527,8 +527,8 @@ finish(error_code& ec) // operator<< is not supported for file_body template std::ostream& -operator<<(std::ostream& os, message< - isRequest, basic_file_body, Fields> const& msg) = delete; +operator<<(std::ostream&, message< + isRequest, basic_file_body, Fields> const&) = delete; #endif } // http diff --git a/test/beast/core/async_base.cpp b/test/beast/core/async_base.cpp index 8fdd944b..303cbc75 100644 --- a/test/beast/core/async_base.cpp +++ b/test/beast/core/async_base.cpp @@ -130,8 +130,8 @@ struct associated_allocator< static type get( boost::beast::handler< boost::beast::no_ex, - boost::beast::intrusive_alloc> const& h, - Allocator const& a = Allocator()) noexcept + boost::beast::intrusive_alloc> const&, + Allocator const& = Allocator()) noexcept { return type{}; } @@ -150,8 +150,8 @@ struct associated_executor< static type get( boost::beast::handler< boost::beast::intrusive_ex, - boost::beast::no_alloc> const& h, - Executor const& a = Executor()) noexcept + boost::beast::no_alloc> const&, + Executor const& = Executor()) noexcept { return type{}; } diff --git a/test/beast/core/test_handler.hpp b/test/beast/core/test_handler.hpp index 8601c703..1e33d46e 100644 --- a/test/beast/core/test_handler.hpp +++ b/test/beast/core/test_handler.hpp @@ -204,8 +204,8 @@ struct associated_allocator< using type = std::allocator; static type get( - boost::beast::legacy_handler const& h, - Allocator const& a = Allocator()) noexcept + boost::beast::legacy_handler const&, + Allocator const& = Allocator()) noexcept { return type{}; } diff --git a/test/beast/websocket/handshake.cpp b/test/beast/websocket/handshake.cpp index ceb74abc..e5ea4004 100644 --- a/test/beast/websocket/handshake.cpp +++ b/test/beast/websocket/handshake.cpp @@ -697,7 +697,6 @@ public: test::connect(ws1.next_layer(), ws2.next_layer()); ws2.set_option(stream_base::decorator(make_big)); - error_code ec; ws2.async_accept(test::success_handler()); ws1.async_handshake("test", "/", test::success_handler()); ioc.run(); diff --git a/test/doc/snippets.ipp b/test/doc/snippets.ipp index 153928d4..7dfffdff 100644 --- a/test/doc/snippets.ipp +++ b/test/doc/snippets.ipp @@ -24,3 +24,4 @@ tcp::socket sock(ioc); ssl::context ctx(ssl::context::tlsv12); +boost::ignore_unused(ec);