forked from boostorg/beast
Fix unused variable warnings
This commit is contained in:
@@ -950,6 +950,7 @@ void custom_parser<isRequest>::
|
||||
on_request(verb method, string_view method_str,
|
||||
string_view path, int version, error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(method, method_str, path, version);
|
||||
ec = {};
|
||||
}
|
||||
|
||||
@@ -958,6 +959,7 @@ void custom_parser<isRequest>::
|
||||
on_response(int status, string_view reason,
|
||||
int version, error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(status, reason, version);
|
||||
ec = {};
|
||||
}
|
||||
|
||||
@@ -966,6 +968,7 @@ void custom_parser<isRequest>::
|
||||
on_field(field f, string_view name,
|
||||
string_view value, error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(f, name, value);
|
||||
ec = {};
|
||||
}
|
||||
|
||||
@@ -981,6 +984,7 @@ void custom_parser<isRequest>::
|
||||
on_body(boost::optional<std::uint64_t> const& content_length,
|
||||
error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(content_length);
|
||||
ec = {};
|
||||
}
|
||||
|
||||
@@ -988,6 +992,7 @@ template<bool isRequest>
|
||||
void custom_parser<isRequest>::
|
||||
on_data(string_view s, error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(s);
|
||||
ec = {};
|
||||
}
|
||||
|
||||
@@ -996,6 +1001,7 @@ void custom_parser<isRequest>::
|
||||
on_chunk(std::uint64_t size,
|
||||
string_view extension, error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(size, extension);
|
||||
ec = {};
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <beast/core.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <cstddef>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
@@ -328,7 +329,7 @@ async_echo(AsyncStream& stream, CompletionToken&& token)
|
||||
|
||||
//]
|
||||
|
||||
int main()
|
||||
int main(int, char** argv)
|
||||
{
|
||||
using address_type = boost::asio::ip::address;
|
||||
using socket_type = boost::asio::ip::tcp::socket;
|
||||
@@ -347,6 +348,8 @@ int main()
|
||||
async_echo(sock,
|
||||
[&](beast::error_code ec)
|
||||
{
|
||||
if(ec)
|
||||
std::cerr << argv[0] << ": " << ec.message() << std::endl;
|
||||
});
|
||||
ios.run();
|
||||
return 0;
|
||||
|
||||
@@ -346,6 +346,8 @@ void
|
||||
file_body::writer::
|
||||
init(boost::optional<std::uint64_t> const& content_length, beast::error_code& ec)
|
||||
{
|
||||
boost::ignore_unused(content_length);
|
||||
|
||||
// Attempt to open the file for writing
|
||||
file_ = fopen(path_.string().c_str(), "wb");
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ public:
|
||||
beast::http::request<Body, Fields>&& req,
|
||||
Send const& send) const
|
||||
{
|
||||
boost::ignore_unused(ep);
|
||||
|
||||
// Determine our action based on the method
|
||||
switch(req.method())
|
||||
{
|
||||
@@ -219,6 +221,7 @@ private:
|
||||
beast::http::request<Body, Fields> const& req,
|
||||
boost::filesystem::path const& rel_path) const
|
||||
{
|
||||
boost::ignore_unused(rel_path);
|
||||
beast::http::response<beast::http::string_body> res;
|
||||
res.version = req.version;
|
||||
res.result(beast::http::status::not_found);
|
||||
|
||||
@@ -119,7 +119,7 @@ ssl_certificate::construct()
|
||||
"-----END DH PARAMETERS-----\n";
|
||||
|
||||
ctx_.set_password_callback(
|
||||
[](std::size_t size,
|
||||
[](std::size_t,
|
||||
boost::asio::ssl::context_base::password_purpose)
|
||||
{
|
||||
return "test";
|
||||
|
||||
@@ -57,6 +57,7 @@ class write_msg_op
|
||||
: stream(stream_)
|
||||
, msg(std::move(msg_))
|
||||
{
|
||||
boost::ignore_unused(handler);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user