Skip to content

Commit e5dcaa6

Browse files
committed
Merge pull request cpp-netlib#465 from povilasb/0.11-devel-fix-warnings
Fixed compilation warnings.
2 parents 2028c55 + 7b93773 commit e5dcaa6

File tree

6 files changed

+39
-1
lines changed

6 files changed

+39
-1
lines changed

boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ struct http_async_connection
199199
body_generator_function_type generator,
200200
boost::system::error_code const& ec,
201201
std::size_t bytes_transferred) {
202+
// TODO(dberris): review parameter necessity.
203+
(void)bytes_transferred;
204+
202205
if (!is_timedout_ && !ec) {
203206
if (generator) {
204207
// Here we write some more data that the generator provides,

boost/network/protocol/http/client/connection/async_protocol_handler.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,32 @@ struct http_async_protocol_handler {
4646

4747
template <class ResponseType>
4848
void init_response(ResponseType& response_, bool get_body) {
49+
// TODO(dberris): review parameter necessity.
50+
(void)get_body;
51+
4952
boost::shared_future<string_type> source_future(
5053
source_promise.get_future());
5154
source(response_, source_future);
55+
5256
boost::shared_future<string_type> destination_future(
5357
destination_promise.get_future());
5458
destination(response_, destination_future);
59+
5560
boost::shared_future<typename headers_container<Tag>::type> headers_future(
5661
headers_promise.get_future());
5762
headers(response_, headers_future);
63+
5864
boost::shared_future<string_type> body_future(body_promise.get_future());
5965
body(response_, body_future);
66+
6067
boost::shared_future<string_type> version_future(
6168
version_promise.get_future());
6269
version(response_, version_future);
70+
6371
boost::shared_future<boost::uint16_t> status_future(
6472
status_promise.get_future());
6573
status(response_, status_future);
74+
6675
boost::shared_future<string_type> status_message_future(
6776
status_message_promise.get_future());
6877
status_message(response_, status_message_future);

boost/network/protocol/http/client/connection/normal_delegate.ipp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ boost::network::http::impl::normal_delegate::normal_delegate(
2121
void boost::network::http::impl::normal_delegate::connect(
2222
asio::ip::tcp::endpoint &endpoint, std::string host,
2323
function<void(system::error_code const &)> handler) {
24+
25+
// TODO(dberris): review parameter necessity.
26+
(void)host;
27+
2428
socket_.reset(new asio::ip::tcp::socket(service_));
2529
socket_->async_connect(endpoint, handler);
2630
}

boost/network/protocol/http/client/connection/sync_base.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,19 @@ struct sync_connection_base_impl {
102102
template <class Socket>
103103
void send_request_impl(Socket& socket_, string_type const& method,
104104
boost::asio::streambuf& request_buffer) {
105+
// TODO(dberris): review parameter necessity.
106+
(void)method;
107+
105108
write(socket_, request_buffer);
106109
}
107110

108111
template <class Socket>
109112
void read_body_normal(Socket& socket_, basic_response<Tag>& response_,
110113
boost::asio::streambuf& response_buffer,
111114
typename ostringstream<Tag>::type& body_stream) {
115+
// TODO(dberris): review parameter necessity.
116+
(void)response_;
117+
112118
boost::system::error_code error;
113119
if (response_buffer.size() > 0) body_stream << &response_buffer;
114120

boost/network/protocol/http/policies/pooled_connection.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ struct pooled_connection_policy : resolver_policy<Tag>::type {
6565
certificate_filename_(certificate_filename),
6666
verify_path_(verify_path),
6767
certificate_file_(certificate_file),
68-
private_key_file_(private_key_file) {}
68+
private_key_file_(private_key_file) {
69+
70+
// TODO(dberris): review parameter necessity.
71+
(void)host;
72+
(void)port;
73+
}
6974

7075
basic_response<Tag> send_request(string_type const& method,
7176
basic_request<Tag> request_, bool get_body,
@@ -79,6 +84,9 @@ struct pooled_connection_policy : resolver_policy<Tag>::type {
7984
string_type const& method, basic_request<Tag> request_, bool get_body,
8085
body_callback_function_type callback,
8186
body_generator_function_type generator) {
87+
// TODO(dberris): review parameter necessity.
88+
(void)callback;
89+
8290
boost::uint8_t count = 0;
8391
bool retry = false;
8492
do {

boost/network/protocol/http/policies/simple_connection.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ struct simple_connection_policy : resolver_policy<Tag>::type {
5050
optional<string_type> const& certificate_file = optional<string_type>(),
5151
optional<string_type> const& private_key_file = optional<string_type>())
5252
: pimpl(), follow_redirect_(follow_redirect) {
53+
54+
// TODO(dberris): review parameter necessity.
55+
(void)hostname;
56+
(void)port;
57+
5358
pimpl.reset(impl::sync_connection_base<
5459
Tag, version_major,
5560
version_minor>::new_connection(resolver, resolve, https,
@@ -62,6 +67,9 @@ struct simple_connection_policy : resolver_policy<Tag>::type {
6267
basic_request<Tag> request_, bool get_body,
6368
body_callback_function_type callback,
6469
body_generator_function_type generator) {
70+
// TODO(dberris): review parameter necessity.
71+
(void)callback;
72+
6573
basic_response<Tag> response_;
6674
do {
6775
pimpl->init_socket(request_.host(),

0 commit comments

Comments
 (0)