Commit 7c60db1e authored by vitaut's avatar vitaut

Fix a warning

parent 0ea73df7
......@@ -3383,7 +3383,9 @@ int parse_nonnegative_int(const Char *&s) {
}
value = new_value;
} while ('0' <= *s && *s <= '9');
if (value > (std::numeric_limits<int>::max)())
// Convert to unsigned to prevent a warning.
unsigned max_int = (std::numeric_limits<int>::max)();
if (value > max_int)
FMT_THROW(FormatError("number is too big"));
return value;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment