diff --git a/src/http2.cc b/src/http2.cc index 2bc853f5..38d74a3e 100644 --- a/src/http2.cc +++ b/src/http2.cc @@ -1670,7 +1670,7 @@ bool contains_trailers(const StringRef &s) { for (auto p = std::begin(s), end = std::end(s);; ++p) { p = std::find_if(p, end, [](char c) { return c != ' ' && c != '\t'; }); - if (p == end || end - p < trailers.size()) { + if (p == end || static_cast(end - p) < trailers.size()) { return false; } if (util::strieq(trailers, StringRef{p, p + trailers.size()})) {