src: Fix compiler warnings

This commit is contained in:
Tatsuhiro Tsujikawa 2016-05-31 21:26:21 +09:00
parent be06f1d428
commit 3753b47475
2 changed files with 4 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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);