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:
Andrew Whatson
2017-07-20 08:12:13 -07:00
committed by Vinnie Falco
parent 0a1c24eb9f
commit ed23fd5811
17 changed files with 47 additions and 9 deletions
+1
View File
@@ -10,6 +10,7 @@
#include <beast/core/write_dynabuf.hpp>
#include <beast/http/detail/basic_parser_v1.hpp>
#include <beast/http/detail/rfc7230.hpp>
#include <cstdint>
#include <random>
#include <string>
+2 -1
View File
@@ -795,7 +795,7 @@ private:
bool
on_request(unsigned method, std::string const& url,
int major, int minor, bool keep_alive, bool upgrade,
int major, int minor, bool /*keep_alive*/, bool /*upgrade*/,
std::true_type)
{
m_.method = detail::method_to_string(method);
@@ -826,6 +826,7 @@ private:
int major, int minor, bool keep_alive, bool upgrade,
std::true_type)
{
beast::detail::ignore_unused(keep_alive, upgrade);
m_.status = status;
m_.reason = reason;
m_.version = major * 10 + minor;
+2 -1
View File
@@ -64,7 +64,7 @@ public:
template<class ConstBufferSequence>
std::size_t
write_some(
ConstBufferSequence const& buffers, error_code& ec)
ConstBufferSequence const& buffers, error_code&)
{
auto const n = buffer_size(buffers);
using boost::asio::buffer_size;
@@ -112,6 +112,7 @@ public:
void
init(error_code& ec) noexcept
{
beast::detail::ignore_unused(ec);
}
template<class WriteFunction>
+1 -1
View File
@@ -490,7 +490,7 @@ public:
}
}
void testClose(endpoint_type const& ep, yield_context do_yield)
void testClose(endpoint_type const& ep, yield_context)
{
{
// payload length 1
@@ -8,6 +8,7 @@
#ifndef BEAST_WEBSOCKET_SYNC_ECHO_PEER_H_INCLUDED
#define BEAST_WEBSOCKET_SYNC_ECHO_PEER_H_INCLUDED
#include <beast/core/placeholders.hpp>
#include <beast/core/streambuf.hpp>
#include <beast/websocket.hpp>
#include <boost/optional.hpp>
@@ -36,7 +37,7 @@ private:
std::thread thread_;
public:
sync_echo_server(bool server, endpoint_type ep)
sync_echo_server(bool /*server*/, endpoint_type ep)
: sock_(ios_)
, acceptor_(ios_)
{