nghttpx: Fix compile error with gcc

This commit is contained in:
Tatsuhiro Tsujikawa 2016-09-10 16:51:35 +09:00
parent 9aa26970be
commit 456038e3de
1 changed files with 2 additions and 1 deletions

View File

@ -320,7 +320,8 @@ int parse_uint_with_unit(T *dest, const StringRef &opt,
return -1;
}
if (std::numeric_limits<T>::max() < n) {
if (static_cast<uint64_t>(std::numeric_limits<T>::max()) <
static_cast<uint64_t>(n)) {
LOG(ERROR) << opt
<< ": too large. The value should be less than or equal to "
<< std::numeric_limits<T>::max();