Skip to content

Commit f78cab3

Browse files
Sven Overglynos
authored andcommitted
Fix compiler warnings (-Wignored-qualifiers and -Wunused-parameter)
Declaring return types as const has no effect. GCC warns you when it encounters such meaningless qualifiers.
1 parent fd25971 commit f78cab3

File tree

10 files changed

+43
-43
lines changed

10 files changed

+43
-43
lines changed

boost/network/protocol/http/impl/message.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ namespace boost { namespace network { namespace http {
129129
}
130130

131131
template <typename Tag>
132-
bool const message_impl<Tag>::base64_decode(const typename message_impl<Tag>::string_type &input, typename message_impl<Tag>::string_type &output)
132+
bool message_impl<Tag>::base64_decode(const typename message_impl<Tag>::string_type &input, typename message_impl<Tag>::string_type &output)
133133
{
134134
static const char nop = -1;
135135
static const char decoding_data[] = {
@@ -210,7 +210,7 @@ namespace boost { namespace network { namespace http {
210210
}
211211

212212
template <typename Tag>
213-
bool const message_impl<Tag>::base64_encode(typename message_impl<Tag>::string_type const & input, typename message_impl<Tag>::string_type & output)
213+
bool message_impl<Tag>::base64_encode(typename message_impl<Tag>::string_type const & input, typename message_impl<Tag>::string_type & output)
214214
{
215215
static const char encoding_data[] =
216216
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

boost/network/protocol/http/message.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ namespace boost { namespace network { namespace http {
6060
* @param output decoded string ( may include non-text chars)
6161
* @return true if successful, false if input string contains non-base64 symbols
6262
*/
63-
static bool const base64_decode(string_type const &input, string_type & output);
63+
static bool base64_decode(string_type const &input, string_type & output);
6464

6565
/** encodes strings using base64
6666
*
6767
* @param input arbitrary string ( may include non-text chars)
6868
* @param output base64 encoded string
6969
* @return true if successful
7070
*/
71-
static bool const base64_encode(string_type const &input, string_type & output);
71+
static bool base64_encode(string_type const &input, string_type & output);
7272

7373
protected:
7474
mutable string_type version_;
@@ -100,7 +100,7 @@ namespace boost { namespace network { namespace http {
100100
status_ = status;
101101
}
102102

103-
boost::uint16_t const status() const {
103+
boost::uint16_t status() const {
104104
return status_;
105105
}
106106

boost/network/protocol/http/message/async_message.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace boost { namespace network { namespace http {
7070
version_ = future;
7171
}
7272

73-
boost::uint16_t const status() const {
73+
boost::uint16_t status() const {
7474
return status_.get();
7575
}
7676

boost/network/protocol/http/server/storage_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace boost { namespace network { namespace http {
1515
struct has_io_service {};
1616
protected:
1717
template <class ArgPack>
18-
server_storage_base(ArgPack const & args, no_io_service)
18+
server_storage_base(ArgPack const & /* args */, no_io_service)
1919
: self_service_(new boost::asio::io_service())
2020
, service_(*self_service_)
2121
{}

boost/network/protocol/http/traits/impl/content.ipp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ namespace boost { namespace network { namespace http {
1313

1414
template <>
1515
struct content<tags::http_default_8bit_tcp_resolve> {
16-
static char const * const type_html() {
16+
static char const * type_html() {
1717
static char const * const TYPE_HTML = "text/html";
1818
return TYPE_HTML;
1919
};
2020

21-
static char const * const type_text() {
21+
static char const * type_text() {
2222
static char const * const TYPE_TEXT = "text/plain";
2323
return TYPE_TEXT;
2424
};
2525

26-
static char const * const type_xml() {
26+
static char const * type_xml() {
2727
static char const * const TYPE_XML = "text/xml";
2828
return TYPE_XML;
2929
};
3030

31-
static char const * const type_urlencoded() {
31+
static char const * type_urlencoded() {
3232
static char const * const TYPE_URLENCODED = "application/x-www-form-urlencoded";
3333
return TYPE_URLENCODED;
3434
};

boost/network/protocol/http/traits/impl/delimiters.ipp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ namespace boost { namespace network { namespace http {
1414
// specialize on the tags::http_default_8bit_tcp_resolve type
1515
template <>
1616
struct delimiters<tags::http_default_8bit_tcp_resolve> {
17-
static char const * const string_crlf() {
17+
static char const * string_crlf() {
1818
static char const * const CRLF = "\x0D\x0A";
1919
return CRLF;
2020
};
2121

22-
static char const * const string_http_version() {
22+
static char const * string_http_version() {
2323
static char const * const HTTP_VERSION = "HTTP/1.1";
2424
return HTTP_VERSION;
2525
};
2626

27-
static char const * const header_name_value_delimiter() {
27+
static char const * header_name_value_delimiter() {
2828
static char const * const HEADER_NAME_VALUE_DELIMITER = ": ";
2929
return HEADER_NAME_VALUE_DELIMITER;
3030
};

boost/network/protocol/http/traits/impl/headers.ipp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,62 @@ namespace boost { namespace network { namespace http {
1313

1414
template <>
1515
struct headers_<tags::http_default_8bit_tcp_resolve> {
16-
static char const * const host() {
16+
static char const * host() {
1717
static char const * const HOST = "Host";
1818
return HOST;
1919
};
2020

21-
static char const * const cookie() {
21+
static char const * cookie() {
2222
static char const * const COOKIE = "Cookie";
2323
return COOKIE;
2424
};
2525

26-
static char const * const set_cookie() {
26+
static char const * set_cookie() {
2727
static char const * const SET_COOKIE = "Set-Cookie";
2828
return SET_COOKIE;
2929
};
3030

31-
static char const * const connection() {
31+
static char const * connection() {
3232
static char const * const CONNECTION = "Connection";
3333
return CONNECTION;
3434
};
3535

36-
static char const * const content_type() {
36+
static char const * content_type() {
3737
static char const * const CONTENT_TYPE = "Content-Type";
3838
return CONTENT_TYPE;
3939
};
4040

41-
static char const * const content_length() {
41+
static char const * content_length() {
4242
static char const * const CONTENT_LENGTH = "Content-Length";
4343
return CONTENT_LENGTH;
4444
};
4545

46-
static char const * const content_location() {
46+
static char const * content_location() {
4747
static char const * const CONTENT_LOCATION = "Content-Location";
4848
return CONTENT_LOCATION;
4949
};
5050

51-
static char const * const last_modified() {
51+
static char const * last_modified() {
5252
static char const * const LAST_MODIFIED = "Last-Modified";
5353
return LAST_MODIFIED;
5454
};
5555

56-
static char const * const if_modified_since() {
56+
static char const * if_modified_since() {
5757
static char const * const IF_MODIFIED_SINCE = "If-Modified-Since";
5858
return IF_MODIFIED_SINCE;
5959
};
6060

61-
static char const * const transfer_encoding() {
61+
static char const * transfer_encoding() {
6262
static char const * const TRANSFER_ENCODING = "Transfer-Encoding";
6363
return TRANSFER_ENCODING;
6464
};
6565

66-
static char const * const location() {
66+
static char const * location() {
6767
static char const * const LOCATION = "Location";
6868
return LOCATION;
6969
};
7070

71-
static char const * const authorization() {
71+
static char const * authorization() {
7272
static char const * const AUTHORIZATION = "Authorization";
7373
return AUTHORIZATION;
7474
};

boost/network/protocol/http/traits/impl/request_methods.ipp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ namespace boost { namespace network { namespace http {
1313

1414
template <>
1515
struct request_methods<tags::http_default_8bit_tcp_resolve> {
16-
static char const * const head() {
16+
static char const * head() {
1717
static char const * const HEAD = "HEAD";
1818
return HEAD;
1919
};
2020

21-
static char const * const get() {
21+
static char const * get() {
2222
static char const * const GET = "GET";
2323
return GET;
2424
};
2525

26-
static char const * const put() {
26+
static char const * put() {
2727
static char const * const PUT = "PUT";
2828
return PUT;
2929
};
3030

31-
static char const * const post() {
31+
static char const * post() {
3232
static char const * const POST = "POST";
3333
return POST;
3434
};
3535

36-
static char const * const delete_() {
36+
static char const * delete_() {
3737
static char const * const DELETE_ = "DELETE";
3838
return DELETE_;
3939
};

boost/network/protocol/http/traits/impl/response_message.ipp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,57 +13,57 @@ namespace boost { namespace network { namespace http {
1313

1414
template <>
1515
struct response_message<tags::http_default_8bit_tcp_resolve> {
16-
static char const * const ok() {
16+
static char const * ok() {
1717
static char const * const OK = "OK";
1818
return OK;
1919
};
2020

21-
static char const * const created() {
21+
static char const * created() {
2222
static char const * const CREATED = "Created";
2323
return CREATED;
2424
};
2525

26-
static char const * const no_content() {
26+
static char const * no_content() {
2727
static char const * const NO_CONTENT = "NO Content";
2828
return NO_CONTENT;
2929
};
3030

31-
static char const * const unauthorized() {
31+
static char const * unauthorized() {
3232
static char const * const UNAUTHORIZED = "Unauthorized";
3333
return UNAUTHORIZED;
3434
};
3535

36-
static char const * const forbidden() {
36+
static char const * forbidden() {
3737
static char const * const FORBIDDEN = "Fobidden";
3838
return FORBIDDEN;
3939
};
4040

41-
static char const * const not_found() {
41+
static char const * not_found() {
4242
static char const * const NOT_FOUND = "Not Found";
4343
return NOT_FOUND;
4444
};
4545

46-
static char const * const method_not_allowed() {
46+
static char const * method_not_allowed() {
4747
static char const * const METHOD_NOT_ALLOWED = "Method Not Allowed";
4848
return METHOD_NOT_ALLOWED;
4949
};
5050

51-
static char const * const not_modified() {
51+
static char const * not_modified() {
5252
static char const * const NOT_MODIFIED = "Not Modified";
5353
return NOT_MODIFIED;
5454
};
5555

56-
static char const * const bad_request() {
56+
static char const * bad_request() {
5757
static char const * const BAD_REQUEST = "Bad Request";
5858
return BAD_REQUEST;
5959
};
6060

61-
static char const * const server_error() {
61+
static char const * server_error() {
6262
static char const * const SERVER_ERROR = "Server Error";
6363
return SERVER_ERROR;
6464
};
6565

66-
static char const * const not_implemented() {
66+
static char const * not_implemented() {
6767
static char const * const NOT_IMPLEMENTED = "Not Implemented";
6868
return NOT_IMPLEMENTED;
6969
};

boost/network/utils/thread_pool.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace boost { namespace network { namespace utils {
6868
commit = true;
6969
}
7070

71-
std::size_t const thread_count() const {
71+
std::size_t thread_count() const {
7272
return threads_;
7373
}
7474

0 commit comments

Comments
 (0)