From f4474d57ec2b375b399c302b4d82d2a60e52b8a8 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 7 Nov 2016 23:11:52 +0900 Subject: [PATCH] nghttpx: Fix compile error with gcc --- src/http2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()})) {