forked from boostorg/beast
Fix unused parameter warnings and missing includes:
fix #127 * Added beast::detail::ignore_unused based on boost::ignore_unused * Added -Wextra compilation flag when building with gcc * Fixed all unused parameter warnings with ignore_unused * Fixed all missing includes when building each .hpp separately
This commit is contained in:
1 parent
0a1c24eb9f
commit
ed23fd5811
17 files changed
+47
-9
No files matched your search
@@ -9,6 +9,7 @@
|
||||
#define BEAST_HTTP_BASIC_DYNABUF_BODY_HPP
|
||||
|
||||
#include <beast/http/body_type.hpp>
|
||||
#include <beast/core/detail/type_traits.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
|
||||
namespace beast {
|
||||
@@ -73,6 +74,7 @@ private:
|
||||
void
|
||||
init(error_code& ec) noexcept
|
||||
{
|
||||
beast::detail::ignore_unused(ec);
|
||||
}
|
||||
|
||||
std::uint64_t
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define BEAST_HTTP_EMPTY_BODY_HPP
|
||||
|
||||
#include <beast/http/body_type.hpp>
|
||||
#include <beast/core/detail/type_traits.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -39,11 +40,13 @@ private:
|
||||
explicit
|
||||
writer(message<isRequest, empty_body, Headers> const& m) noexcept
|
||||
{
|
||||
beast::detail::ignore_unused(m);
|
||||
}
|
||||
|
||||
void
|
||||
init(error_code& ec) noexcept
|
||||
{
|
||||
beast::detail::ignore_unused(ec);
|
||||
}
|
||||
|
||||
std::uint64_t
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <beast/http/concepts.hpp>
|
||||
#include <beast/http/rfc7230.hpp>
|
||||
#include <beast/core/detail/ci_char_traits.hpp>
|
||||
#include <beast/core/detail/type_traits.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <stdexcept>
|
||||
@@ -61,6 +62,7 @@ void
|
||||
prepare_options(prepare_info& pi,
|
||||
message<isRequest, Body, Headers>& msg)
|
||||
{
|
||||
beast::detail::ignore_unused(pi, msg);
|
||||
}
|
||||
|
||||
template<bool isRequest, class Body, class Headers>
|
||||
@@ -69,6 +71,7 @@ prepare_option(prepare_info& pi,
|
||||
message<isRequest, Body, Headers>& msg,
|
||||
connection value)
|
||||
{
|
||||
beast::detail::ignore_unused(msg);
|
||||
pi.connection_value = value;
|
||||
}
|
||||
|
||||
@@ -106,6 +109,7 @@ prepare_content_length(prepare_info& pi,
|
||||
message<isRequest, Body, Headers> const& msg,
|
||||
std::false_type)
|
||||
{
|
||||
beast::detail::ignore_unused(msg);
|
||||
pi.content_length = boost::none;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <beast/http/headers_parser_v1.hpp>
|
||||
#include <beast/http/message.hpp>
|
||||
#include <beast/core/error.hpp>
|
||||
#include <beast/core/detail/type_traits.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <functional>
|
||||
@@ -231,13 +232,13 @@ private:
|
||||
m_.reason = std::move(this->reason_);
|
||||
}
|
||||
|
||||
void on_request(error_code& ec)
|
||||
void on_request(error_code&)
|
||||
{
|
||||
on_request_or_response(
|
||||
std::integral_constant<bool, isRequest>{});
|
||||
}
|
||||
|
||||
void on_response(error_code& ec)
|
||||
void on_response(error_code&)
|
||||
{
|
||||
on_request_or_response(
|
||||
std::integral_constant<bool, isRequest>{});
|
||||
@@ -256,7 +257,7 @@ private:
|
||||
}
|
||||
|
||||
void
|
||||
on_headers(std::uint64_t, error_code& ec)
|
||||
on_headers(std::uint64_t, error_code&)
|
||||
{
|
||||
flush();
|
||||
m_.version = 10 * this->http_major() + this->http_minor();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define BEAST_HTTP_STRING_BODY_HPP
|
||||
|
||||
#include <beast/http/body_type.hpp>
|
||||
#include <beast/core/detail/type_traits.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -73,6 +74,7 @@ private:
|
||||
void
|
||||
init(error_code& ec) noexcept
|
||||
{
|
||||
beast::detail::ignore_unused(ec);
|
||||
}
|
||||
|
||||
std::uint64_t
|
||||
|
||||
Reference in new issue
Block a user