mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
src: Fix compiler warnings
This commit is contained in:
@@ -1288,7 +1288,7 @@ void prepare_response(Stream *stream, Http2Handler *hd,
|
||||
p = std::copy(std::begin(htdocs), std::end(htdocs), p);
|
||||
p = std::copy(std::begin(path), std::end(path), p);
|
||||
if (trailing_slash) {
|
||||
p = std::copy(std::begin(DEFAULT_HTML), std::end(DEFAULT_HTML), p);
|
||||
std::copy(std::begin(DEFAULT_HTML), std::end(DEFAULT_HTML), p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -797,8 +797,9 @@ std::vector<unsigned char> get_default_alpn() {
|
||||
std::vector<StringRef> split_str(const StringRef &s, char delim) {
|
||||
size_t len = 1;
|
||||
auto last = std::end(s);
|
||||
for (auto first = std::begin(s), d = first;
|
||||
(d = std::find(first, last, delim)) != last; ++len, first = d + 1)
|
||||
StringRef::const_iterator d;
|
||||
for (auto first = std::begin(s); (d = std::find(first, last, delim)) != last;
|
||||
++len, first = d + 1)
|
||||
;
|
||||
|
||||
auto list = std::vector<StringRef>(len);
|
||||
|
||||
Reference in New Issue
Block a user