forked from boostorg/beast
Fix unused variable warnings
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#ifndef BEAST_CONFIG_HPP
|
||||
#define BEAST_CONFIG_HPP
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
/*
|
||||
|
||||
@@ -62,19 +62,6 @@ inline
|
||||
void
|
||||
accept_rv(T){}
|
||||
|
||||
template<class... Ts>
|
||||
inline
|
||||
void
|
||||
ignore_unused(Ts const& ...)
|
||||
{
|
||||
}
|
||||
|
||||
template<class... Ts>
|
||||
inline
|
||||
void
|
||||
ignore_unused()
|
||||
{}
|
||||
|
||||
template<class U>
|
||||
std::size_t constexpr
|
||||
max_sizeof()
|
||||
|
||||
@@ -134,8 +134,9 @@ public:
|
||||
template<class U>
|
||||
friend
|
||||
bool
|
||||
operator==(handler_alloc const& lhs,
|
||||
handler_alloc<U, Handler> const& rhs)
|
||||
operator==(
|
||||
handler_alloc const&,
|
||||
handler_alloc<U, Handler> const&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -143,7 +144,8 @@ public:
|
||||
template<class U>
|
||||
friend
|
||||
bool
|
||||
operator!=(handler_alloc const& lhs,
|
||||
operator!=(
|
||||
handler_alloc const& lhs,
|
||||
handler_alloc<U, Handler> const& rhs)
|
||||
{
|
||||
return ! (lhs == rhs);
|
||||
|
||||
@@ -524,7 +524,7 @@ assign_char(CharT ch, std::true_type) ->
|
||||
template<std::size_t N, class CharT, class Traits>
|
||||
auto
|
||||
static_string<N, CharT, Traits>::
|
||||
assign_char(CharT ch, std::false_type) ->
|
||||
assign_char(CharT, std::false_type) ->
|
||||
static_string&
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(std::length_error{
|
||||
|
||||
@@ -90,7 +90,7 @@ struct empty_body
|
||||
{
|
||||
template<bool isRequest, class Fields>
|
||||
explicit
|
||||
writer(message<isRequest, empty_body, Fields>& msg)
|
||||
writer(message<isRequest, empty_body, Fields>&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ template<class Allocator>
|
||||
template<class String>
|
||||
void
|
||||
basic_fields<Allocator>::reader::
|
||||
prepare(String& s, basic_fields const& f,
|
||||
prepare(String& s, basic_fields const&,
|
||||
unsigned version, verb v)
|
||||
{
|
||||
if(v == verb::unknown)
|
||||
@@ -271,7 +271,7 @@ template<class Allocator>
|
||||
template<class String>
|
||||
void
|
||||
basic_fields<Allocator>::reader::
|
||||
prepare(String& s,basic_fields const& f,
|
||||
prepare(String& s, basic_fields const&,
|
||||
unsigned version, unsigned code)
|
||||
{
|
||||
if(version == 11)
|
||||
|
||||
@@ -318,7 +318,7 @@ class read_msg_op
|
||||
message_type& m;
|
||||
parser_type p;
|
||||
|
||||
data(Handler& handler, Stream& s_,
|
||||
data(Handler&, Stream& s_,
|
||||
DynamicBuffer& b_, message_type& m_)
|
||||
: s(s_)
|
||||
, b(b_)
|
||||
|
||||
@@ -358,7 +358,7 @@ class write_msg_op
|
||||
serializer<isRequest,
|
||||
Body, Fields, no_chunk_decorator> sr;
|
||||
|
||||
data(Handler& h, Stream& s_, message<
|
||||
data(Handler&, Stream& s_, message<
|
||||
isRequest, Body, Fields>& m_)
|
||||
: s(s_)
|
||||
, sr(m_, no_chunk_decorator{})
|
||||
|
||||
@@ -175,7 +175,7 @@ class stream<NextLayer>::accept_op
|
||||
Decorator decorator;
|
||||
http::request_parser<http::empty_body> p;
|
||||
|
||||
data(Handler& handler, stream<NextLayer>& ws_,
|
||||
data(Handler&, stream<NextLayer>& ws_,
|
||||
Decorator const& decorator_)
|
||||
: ws(ws_)
|
||||
, decorator(decorator_)
|
||||
@@ -183,7 +183,7 @@ class stream<NextLayer>::accept_op
|
||||
}
|
||||
|
||||
template<class Buffers>
|
||||
data(Handler& handler, stream<NextLayer>& ws_,
|
||||
data(Handler&, stream<NextLayer>& ws_,
|
||||
Buffers const& buffers,
|
||||
Decorator const& decorator_)
|
||||
: ws(ws_)
|
||||
|
||||
@@ -559,7 +559,7 @@ class stream<NextLayer>::write_op
|
||||
consuming_buffers<Buffers> cb;
|
||||
std::size_t remain;
|
||||
|
||||
data(Handler& handler, stream<NextLayer>& ws_,
|
||||
data(Handler&, stream<NextLayer>& ws_,
|
||||
Buffers const& bs)
|
||||
: ws(ws_)
|
||||
, cb(bs)
|
||||
|
||||
@@ -3099,13 +3099,13 @@ private:
|
||||
|
||||
static
|
||||
void
|
||||
default_decorate_req(request_type& res)
|
||||
default_decorate_req(request_type&)
|
||||
{
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
default_decorate_res(response_type& res)
|
||||
default_decorate_res(response_type&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user