From e8d25d22bc747ce49b034c18b55eab9d80e17454 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Tue, 7 Oct 2014 10:04:54 -0400 Subject: [PATCH] adds documentation and removes unused parameters references #376 --- SConstruct | 2 + examples/debug_client/debug_client.cpp | 8 +- examples/print_server/print_server.cpp | 2 +- .../telemetry_client/telemetry_client.cpp | 6 +- examples/testee_server/testee_server.cpp | 2 +- test/message_buffer/message.cpp | 2 +- test/random/SConscript | 2 +- test/transport/asio/timers.cpp | 2 +- test/transport/integration.cpp | 14 ++-- test/transport/iostream/connection.cpp | 2 +- websocketpp/concurrency/none.hpp | 2 +- .../extensions/permessage_deflate/enabled.hpp | 2 +- websocketpp/logger/stub.hpp | 71 ++++++++++++++++-- websocketpp/processors/hybi00.hpp | 74 ++++++++++++++++--- websocketpp/processors/hybi07.hpp | 14 +++- websocketpp/processors/hybi08.hpp | 14 +++- websocketpp/processors/hybi13.hpp | 14 +++- websocketpp/processors/processor.hpp | 23 ++---- websocketpp/transport/asio/endpoint.hpp | 27 ++++++- websocketpp/transport/asio/security/none.hpp | 5 +- 20 files changed, 215 insertions(+), 73 deletions(-) diff --git a/SConstruct b/SConstruct index 3b621cfe7e..e93295fd62 100644 --- a/SConstruct +++ b/SConstruct @@ -101,12 +101,14 @@ if env['CXX'].startswith('g++'): #env.Append(CCFLAGS = ['-Wconversion']) env.Append(CCFLAGS = ['-Wcast-align']) env.Append(CCFLAGS = ['-Wshadow']) + env.Append(CCFLAGS = ['-Werror=unused-parameter']) elif env['CXX'].startswith('clang++'): #env.Append(CCFLAGS = ['-Wcast-align']) #env.Append(CCFLAGS = ['-Wglobal-constructors']) #env.Append(CCFLAGS = ['-Wconversion']) env.Append(CCFLAGS = ['-Wno-padded']) env.Append(CCFLAGS = ['-Wshadow']) + env.Append(CCFLAGS = ['-Werror=unused-parameter']) # Wpadded # Wsign-conversion diff --git a/examples/debug_client/debug_client.cpp b/examples/debug_client/debug_client.cpp index d5315d185e..74575e9d90 100644 --- a/examples/debug_client/debug_client.cpp +++ b/examples/debug_client/debug_client.cpp @@ -86,11 +86,11 @@ public: m_endpoint.run(); } - void on_socket_init(websocketpp::connection_hdl hdl) { + void on_socket_init(websocketpp::connection_hdl) { m_socket_init = std::chrono::high_resolution_clock::now(); } - context_ptr on_tls_init(websocketpp::connection_hdl hdl) { + context_ptr on_tls_init(websocketpp::connection_hdl) { m_tls_init = std::chrono::high_resolution_clock::now(); context_ptr ctx(new boost::asio::ssl::context(boost::asio::ssl::context::tlsv1)); @@ -108,11 +108,11 @@ public: m_open = std::chrono::high_resolution_clock::now(); m_endpoint.send(hdl, "", websocketpp::frame::opcode::text); } - void on_message(websocketpp::connection_hdl hdl, message_ptr msg) { + void on_message(websocketpp::connection_hdl hdl, message_ptr) { m_message = std::chrono::high_resolution_clock::now(); m_endpoint.close(hdl,websocketpp::close::status::going_away,""); } - void on_close(websocketpp::connection_hdl hdl) { + void on_close(websocketpp::connection_hdl) { m_close = std::chrono::high_resolution_clock::now(); std::cout << "Socket Init: " << std::chrono::duration_cast(m_socket_init-m_start).count() << std::endl; diff --git a/examples/print_server/print_server.cpp b/examples/print_server/print_server.cpp index 962ec45ae2..78fb0e8f92 100644 --- a/examples/print_server/print_server.cpp +++ b/examples/print_server/print_server.cpp @@ -5,7 +5,7 @@ typedef websocketpp::server server; -void on_message(websocketpp::connection_hdl hdl, server::message_ptr msg) { +void on_message(websocketpp::connection_hdl, server::message_ptr msg) { std::cout << msg->get_payload() << std::endl; } diff --git a/examples/telemetry_client/telemetry_client.cpp b/examples/telemetry_client/telemetry_client.cpp index 1db6f9953d..658fb3d468 100644 --- a/examples/telemetry_client/telemetry_client.cpp +++ b/examples/telemetry_client/telemetry_client.cpp @@ -65,7 +65,7 @@ public: } // The open handler will signal that we are ready to start sending telemetry - void on_open(websocketpp::connection_hdl hdl) { + void on_open(websocketpp::connection_hdl) { m_client.get_alog().write(websocketpp::log::alevel::app, "Connection opened, starting telemetry!"); @@ -74,7 +74,7 @@ public: } // The close handler will signal that we should stop sending telemetry - void on_close(websocketpp::connection_hdl hdl) { + void on_close(websocketpp::connection_hdl) { m_client.get_alog().write(websocketpp::log::alevel::app, "Connection closed, stopping telemetry!"); @@ -83,7 +83,7 @@ public: } // The fail handler will signal that we should stop sending telemetry - void on_fail(websocketpp::connection_hdl hdl) { + void on_fail(websocketpp::connection_hdl) { m_client.get_alog().write(websocketpp::log::alevel::app, "Connection failed, stopping telemetry!"); diff --git a/examples/testee_server/testee_server.cpp b/examples/testee_server/testee_server.cpp index a21ff33666..bc2455219b 100644 --- a/examples/testee_server/testee_server.cpp +++ b/examples/testee_server/testee_server.cpp @@ -80,7 +80,7 @@ void on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg) { s->send(hdl, msg->get_payload(), msg->get_opcode()); } -void on_socket_init(websocketpp::connection_hdl hdl, boost::asio::ip::tcp::socket & s) { +void on_socket_init(websocketpp::connection_hdl, boost::asio::ip::tcp::socket & s) { boost::asio::ip::tcp::no_delay option(true); s.set_option(option); } diff --git a/test/message_buffer/message.cpp b/test/message_buffer/message.cpp index 98e435bee6..5f5eeb710b 100644 --- a/test/message_buffer/message.cpp +++ b/test/message_buffer/message.cpp @@ -40,7 +40,7 @@ struct stub { stub() : recycled(false) {} - bool recycle(message * msg) { + bool recycle(message *) { this->recycled = true; return false; } diff --git a/test/random/SConscript b/test/random/SConscript index 7c2aa36a1a..3cadc9e976 100644 --- a/test/random/SConscript +++ b/test/random/SConscript @@ -10,7 +10,7 @@ Import('polyfill_libs') env = env.Clone () env_cpp11 = env_cpp11.Clone () -BOOST_LIBS = boostlibs(['unit_test_framework','random'],env) + [platform_libs] +BOOST_LIBS = boostlibs(['unit_test_framework','random','system'],env) + [platform_libs] objs = env.Object('random_none_boost.o', ["none.cpp"], LIBS = BOOST_LIBS) objs += env.Object('random_device_boost.o', ["random_device.cpp"], LIBS = BOOST_LIBS) diff --git a/test/transport/asio/timers.cpp b/test/transport/asio/timers.cpp index bec963fc2e..ad97cd0e4b 100644 --- a/test/transport/asio/timers.cpp +++ b/test/transport/asio/timers.cpp @@ -107,7 +107,7 @@ struct config { // Mock context that does no validation typedef websocketpp::lib::shared_ptr context_ptr; -context_ptr on_tls_init(websocketpp::connection_hdl hdl) { +context_ptr on_tls_init(websocketpp::connection_hdl) { return context_ptr(new boost::asio::ssl::context(boost::asio::ssl::context::tlsv1)); } diff --git a/test/transport/integration.cpp b/test/transport/integration.cpp index 6c18eb0902..2aee269df7 100644 --- a/test/transport/integration.cpp +++ b/test/transport/integration.cpp @@ -273,11 +273,11 @@ void run_dummy_client(std::string port) { } } -bool on_ping(websocketpp::connection_hdl, std::string payload) { +bool on_ping(websocketpp::connection_hdl, std::string) { return false; } -void cancel_on_open(server * s, websocketpp::connection_hdl hdl) { +void cancel_on_open(server * s, websocketpp::connection_hdl) { s->stop_listening(); } @@ -294,25 +294,25 @@ void ping_on_open(T * c, std::string payload, websocketpp::connection_hdl hdl) { con->ping(payload); } -void fail_on_pong(websocketpp::connection_hdl hdl, std::string payload) { +void fail_on_pong(websocketpp::connection_hdl, std::string) { BOOST_FAIL( "expected no pong handler" ); } -void fail_on_pong_timeout(websocketpp::connection_hdl hdl, std::string payload) { +void fail_on_pong_timeout(websocketpp::connection_hdl, std::string) { BOOST_FAIL( "expected no pong timeout" ); } -void req_pong(std::string expected_payload, websocketpp::connection_hdl hdl, +void req_pong(std::string expected_payload, websocketpp::connection_hdl, std::string payload) { BOOST_CHECK_EQUAL( expected_payload, payload ); } -void fail_on_open(websocketpp::connection_hdl hdl) { +void fail_on_open(websocketpp::connection_hdl) { BOOST_FAIL( "expected no open handler" ); } -void delay(websocketpp::connection_hdl hdl, long duration) { +void delay(websocketpp::connection_hdl, long duration) { sleep(duration); } diff --git a/test/transport/iostream/connection.cpp b/test/transport/iostream/connection.cpp index ffc3d72397..8edad31aa8 100644 --- a/test/transport/iostream/connection.cpp +++ b/test/transport/iostream/connection.cpp @@ -315,7 +315,7 @@ BOOST_AUTO_TEST_CASE( async_read_at_least2 ) { BOOST_CHECK( std::string(buf,10) == "abcdefgxxx" ); } -void timer_callback_stub(const websocketpp::lib::error_code & ec) {} +void timer_callback_stub(websocketpp::lib::error_code const &) {} BOOST_AUTO_TEST_CASE( set_timer ) { stub_con::ptr con(new stub_con(true,alogger,elogger)); diff --git a/websocketpp/concurrency/none.hpp b/websocketpp/concurrency/none.hpp index 873959d8f2..da9aa4112f 100644 --- a/websocketpp/concurrency/none.hpp +++ b/websocketpp/concurrency/none.hpp @@ -45,7 +45,7 @@ public: /// A fake lock guard implementation that does nothing class fake_lock_guard { public: - explicit fake_lock_guard(fake_mutex foo) {} + explicit fake_lock_guard(fake_mutex) {} ~fake_lock_guard() {} }; } // namespace none_impl diff --git a/websocketpp/extensions/permessage_deflate/enabled.hpp b/websocketpp/extensions/permessage_deflate/enabled.hpp index 7f77ff61dd..fe7287486c 100644 --- a/websocketpp/extensions/permessage_deflate/enabled.hpp +++ b/websocketpp/extensions/permessage_deflate/enabled.hpp @@ -434,7 +434,7 @@ public: * @param response The server response attribute list to validate * @return Validation error or 0 on success */ - lib::error_code validate_offer(http::attribute_list const & response) { + lib::error_code validate_offer(http::attribute_list const &) { return make_error_code(error::general); } diff --git a/websocketpp/logger/stub.hpp b/websocketpp/logger/stub.hpp index 9e044e762f..3843f4db3e 100644 --- a/websocketpp/logger/stub.hpp +++ b/websocketpp/logger/stub.hpp @@ -39,20 +39,75 @@ namespace log { /// Stub logger that ignores all input class stub { public: - explicit stub(channel_type_hint::value h) {} - stub(level c, channel_type_hint::value h) {} + /// Construct the logger + /** + * @param hint A channel type specific hint for how to construct the logger + */ + explicit stub(channel_type_hint::value) {} + + /// Construct the logger + /** + * @param default_channels A set of channels to statically enable + * @param hint A channel type specific hint for how to construct the logger + */ + stub(level, channel_type_hint::value) {} _WEBSOCKETPP_CONSTEXPR_TOKEN_ stub() {} - void set_channels(level channels) {} - void clear_channels(level channels) {} + /// Dynamically enable the given list of channels + /** + * All operations on the stub logger are no-ops and all arguments are + * ignored + * + * @param channels The package of channels to enable + */ + void set_channels(level) {} + + /// Dynamically disable the given list of channels + /** + * All operations on the stub logger are no-ops and all arguments are + * ignored + * + * @param channels The package of channels to disable + */ + void clear_channels(level) {} - void write(level channel, std::string const & msg) {} - void write(level channel, char const * msg) {} + /// Write a string message to the given channel + /** + * Writing on the stub logger is a no-op and all arguments are ignored + * + * @param channel The package of channels to write to + * @param msg The message to write + */ + void write(level, std::string const &) {} + + /// Write a cstring message to the given channel + /** + * Writing on the stub logger is a no-op and all arguments are ignored + * + * @param channel The package of channels to write to + * @param msg The message to write + */ + void write(level, char const *) {} - _WEBSOCKETPP_CONSTEXPR_TOKEN_ bool static_test(level channel) const { + /// Test whether a channel is statically enabled + /** + * The stub logger has no channels so all arguments are ignored and + * `static_test` always returns false. + * + * @param channel The package of channels to test + */ + _WEBSOCKETPP_CONSTEXPR_TOKEN_ bool static_test(level) const { return false; } - bool dynamic_test(level channel) { + + /// Test whether a channel is dynamically enabled + /** + * The stub logger has no channels so all arguments are ignored and + * `dynamic_test` always returns false. + * + * @param channel The package of channels to test + */ + bool dynamic_test(level) { return false; } }; diff --git a/websocketpp/processors/hybi00.hpp b/websocketpp/processors/hybi00.hpp index df54f76fa9..1f9eb885c4 100644 --- a/websocketpp/processors/hybi00.hpp +++ b/websocketpp/processors/hybi00.hpp @@ -141,15 +141,32 @@ public: return lib::error_code(); } - // outgoing client connection processing is not supported for this version - lib::error_code client_handshake_request(request_type& req, uri_ptr uri, - std::vector const & subprotocols) const + /// Fill in a set of request headers for a client connection request + /** + * The Hybi 00 processor only implements incoming connections so this will + * always return an error. + * + * @param [out] req Set of headers to fill in + * @param [in] uri The uri being connected to + * @param [in] subprotocols The list of subprotocols to request + */ + lib::error_code client_handshake_request(request_type &, uri_ptr, + std::vector const &) const { return error::make_error_code(error::no_protocol_support); } - lib::error_code validate_server_handshake_response(request_type const & req, - response_type & res) const + /// Validate the server's response to an outgoing handshake request + /** + * The Hybi 00 processor only implements incoming connections so this will + * always return an error. + * + * @param req The original request sent + * @param res The reponse to generate + * @return An error code, 0 on success, non-zero for other errors + */ + lib::error_code validate_server_handshake_response(request_type const &, + response_type &) const { return error::make_error_code(error::no_protocol_support); } @@ -164,9 +181,16 @@ public: return r.get_header("Origin"); } - // hybi00 doesn't support subprotocols so there never will be any requested - lib::error_code extract_subprotocols(request_type const & req, - std::vector & subprotocol_list) + /// Extracts requested subprotocols from a handshake request + /** + * hybi00 doesn't support subprotocols so there never will be any requested + * + * @param [in] req The request to extract from + * @param [out] subprotocol_list A reference to a vector of strings to store + * the results in. + */ + lib::error_code extract_subprotocols(request_type const &, + std::vector &) { return lib::error_code(); } @@ -319,18 +343,44 @@ public: return lib::error_code(); } - lib::error_code prepare_ping(std::string const & in, message_ptr out) const + /// Prepare a ping frame + /** + * Hybi 00 doesn't support pings so this will always return an error + * + * @param in The string to use for the ping payload + * @param out The message buffer to prepare the ping in. + * @return Status code, zero on success, non-zero on failure + */ + lib::error_code prepare_ping(std::string const &, message_ptr) const { return lib::error_code(error::no_protocol_support); } - lib::error_code prepare_pong(const std::string & in, message_ptr out) const + /// Prepare a pong frame + /** + * Hybi 00 doesn't support pongs so this will always return an error + * + * @param in The string to use for the pong payload + * @param out The message buffer to prepare the pong in. + * @return Status code, zero on success, non-zero on failure + */ + lib::error_code prepare_pong(const std::string &, message_ptr) const { return lib::error_code(error::no_protocol_support); } - lib::error_code prepare_close(close::status::value code, - std::string const & reason, message_ptr out) const + /// Prepare a close frame + /** + * Hybi 00 doesn't support the close code or reason so these parameters are + * ignored. + * + * @param code The close code to send + * @param reason The reason string to send + * @param out The message buffer to prepare the fame in + * @return Status code, zero on success, non-zero on failure + */ + lib::error_code prepare_close(close::status::value, std::string const &, + message_ptr out) const { if (!out) { return lib::error_code(error::invalid_arguments); diff --git a/websocketpp/processors/hybi07.hpp b/websocketpp/processors/hybi07.hpp index bf4956dd6d..0940482287 100644 --- a/websocketpp/processors/hybi07.hpp +++ b/websocketpp/processors/hybi07.hpp @@ -48,9 +48,17 @@ public: explicit hybi07(bool secure, bool p_is_server, msg_manager_ptr manager, rng_type& rng) : hybi08(secure, p_is_server, manager, rng) {} - // outgoing client connection processing is not supported for this version - lib::error_code client_handshake_request(request_type & req, uri_ptr uri, - std::vector const & subprotocols) const + /// Fill in a set of request headers for a client connection request + /** + * The Hybi 07 processor only implements incoming connections so this will + * always return an error. + * + * @param [out] req Set of headers to fill in + * @param [in] uri The uri being connected to + * @param [in] subprotocols The list of subprotocols to request + */ + lib::error_code client_handshake_request(request_type &, uri_ptr, + std::vector const &) const { return error::make_error_code(error::no_protocol_support); } diff --git a/websocketpp/processors/hybi08.hpp b/websocketpp/processors/hybi08.hpp index ba9e2109bd..9b1d07e1b6 100644 --- a/websocketpp/processors/hybi08.hpp +++ b/websocketpp/processors/hybi08.hpp @@ -49,9 +49,17 @@ public: explicit hybi08(bool secure, bool p_is_server, msg_manager_ptr manager, rng_type& rng) : hybi13(secure, p_is_server, manager, rng) {} - // outgoing client connection processing is not supported for this version - lib::error_code client_handshake_request(request_type& req, uri_ptr uri, - std::vector const & subprotocols) const + /// Fill in a set of request headers for a client connection request + /** + * The Hybi 08 processor only implements incoming connections so this will + * always return an error. + * + * @param [out] req Set of headers to fill in + * @param [in] uri The uri being connected to + * @param [in] subprotocols The list of subprotocols to request + */ + lib::error_code client_handshake_request(request_type &, uri_ptr, + std::vector const &) const { return error::make_error_code(error::no_protocol_support); } diff --git a/websocketpp/processors/hybi13.hpp b/websocketpp/processors/hybi13.hpp index b1f114dc2b..907033be25 100644 --- a/websocketpp/processors/hybi13.hpp +++ b/websocketpp/processors/hybi13.hpp @@ -182,7 +182,13 @@ public: return lib::error_code(); } - lib::error_code client_handshake_request(request_type& req, uri_ptr + /// Fill in a set of request headers for a client connection request + /** + * @param [out] req Set of headers to fill in + * @param [in] uri The uri being connected to + * @param [in] subprotocols The list of subprotocols to request + */ + lib::error_code client_handshake_request(request_type & req, uri_ptr uri, std::vector const & subprotocols) const { req.set_method("GET"); @@ -219,6 +225,12 @@ public: return lib::error_code(); } + /// Validate the server's response to an outgoing handshake request + /** + * @param req The original request sent + * @param res The reponse to generate + * @return An error code, 0 on success, non-zero for other errors + */ lib::error_code validate_server_handshake_response(request_type const & req, response_type& res) const { diff --git a/websocketpp/processors/processor.hpp b/websocketpp/processors/processor.hpp index f379fb4f6d..c3a521f66c 100644 --- a/websocketpp/processors/processor.hpp +++ b/websocketpp/processors/processor.hpp @@ -212,8 +212,10 @@ public: * Reads the Sec-WebSocket-Extensions header and determines if any of the * requested extensions are supported by this processor. If they are their * settings data is initialized. + * + * @param request The request headers to look at. */ - virtual err_str_pair negotiate_extensions(request_type const & request) { + virtual err_str_pair negotiate_extensions(request_type const &) { return err_str_pair(); } @@ -253,9 +255,7 @@ public: /// Validate the server's response to an outgoing handshake request /** * @param req The original request sent - * * @param res The reponse to generate - * * @return An error code, 0 on success, non-zero for other errors */ virtual lib::error_code validate_server_handshake_response(request_type @@ -272,10 +272,9 @@ public: * Extracts a list of all subprotocols that the client has requested in the * given opening handshake request. * - * @param req The request to extract from - * - * @param subprotocol_list A reference to a vector of strings to store the - * results in. + * @param [in] req The request to extract from + * @param [out] subprotocol_list A reference to a vector of strings to store + * the results in. */ virtual lib::error_code extract_subprotocols(const request_type & req, std::vector & subprotocol_list) = 0; @@ -289,11 +288,8 @@ public: * interpreted by a protocol processor into discrete frames. * * @param buf Buffer from which bytes should be read. - * * @param len Length of buffer - * * @param ec Reference to an error code to return any errors in - * * @return Number of bytes processed */ virtual size_t consume(uint8_t *buf, size_t len, lib::error_code & ec) = 0; @@ -346,9 +342,7 @@ public: * other than length. Payload need not be UTF-8. * * @param in The string to use for the ping payload - * * @param out The message buffer to prepare the ping in. - * * @return Status code, zero on success, non-zero on failure */ virtual lib::error_code prepare_ping(std::string const & in, message_ptr out) const @@ -360,9 +354,7 @@ public: * other than length. Payload need not be UTF-8. * * @param in The string to use for the pong payload - * * @param out The message buffer to prepare the pong in. - * * @return Status code, zero on success, non-zero on failure */ virtual lib::error_code prepare_pong(std::string const & in, message_ptr out) const @@ -376,11 +368,8 @@ public: * indicate no code. If no code is supplied a reason may not be specified. * * @param code The close code to send - * * @param reason The reason string to send - * * @param out The message buffer to prepare the fame in - * * @return Status code, zero on success, non-zero on failure */ virtual lib::error_code prepare_close(close::status::value code, diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp index 854b3cb79a..f705e96643 100644 --- a/websocketpp/transport/asio/endpoint.hpp +++ b/websocketpp/transport/asio/endpoint.hpp @@ -645,7 +645,7 @@ public: return new_timer; } - /// Timer callback + /// Timer handler /** * The timer pointer is included to ensure the timer isn't destroyed until * after it has expired. @@ -654,7 +654,7 @@ public: * @param callback The function to call back * @param ec A status code indicating an error, if any. */ - void handle_timer(timer_ptr t, timer_handler callback, + void handle_timer(timer_ptr, timer_handler callback, boost::system::error_code const & ec) { if (ec) { @@ -842,7 +842,16 @@ protected: } } - void handle_resolve_timeout(timer_ptr dns_timer, connect_handler callback, + /// DNS resolution timeout handler + /** + * The timer pointer is included to ensure the timer isn't destroyed until + * after it has expired. + * + * @param dns_timer Pointer to the timer in question + * @param callback The function to call back + * @param ec A status code indicating an error, if any. + */ + void handle_resolve_timeout(timer_ptr, connect_handler callback, lib::error_code const & ec) { lib::error_code ret_ec; @@ -941,7 +950,17 @@ protected: } } - void handle_connect_timeout(transport_con_ptr tcon, timer_ptr con_timer, + /// Asio connect timeout handler + /** + * The timer pointer is included to ensure the timer isn't destroyed until + * after it has expired. + * + * @param tcon Pointer to the transport connection that is being connected + * @param con_timer Pointer to the timer in question + * @param callback The function to call back + * @param ec A status code indicating an error, if any. + */ + void handle_connect_timeout(transport_con_ptr tcon, timer_ptr, connect_handler callback, lib::error_code const & ec) { lib::error_code ret_ec; diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp index 556c3217cc..4d32f27946 100644 --- a/websocketpp/transport/asio/security/none.hpp +++ b/websocketpp/transport/asio/security/none.hpp @@ -158,8 +158,7 @@ protected: * @param strand A shared pointer to the connection's asio strand * @param is_server Whether or not the endpoint is a server or not. */ - lib::error_code init_asio (io_service_ptr service, strand_ptr strand, - bool is_server) + lib::error_code init_asio (io_service_ptr service, strand_ptr, bool) { if (m_state != UNINITIALIZED) { return socket::make_error_code(socket::error::invalid_state); @@ -246,7 +245,7 @@ protected: * @param ec The error code to translate_ec * @return The translated error code */ - lib::error_code translate_ec(boost::system::error_code ec) { + lib::error_code translate_ec(boost::system::error_code) { // We don't know any more information about this error so pass through return make_error_code(transport::error::pass_through); }