Fix google-runtime-int warnings.

Bug: 28220065
Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592
This commit is contained in:
Chih-Hung Hsieh
2016-04-18 12:29:30 -07:00
parent 51dcd0da37
commit 54a2747ef3
12 changed files with 53 additions and 46 deletions
+4 -3
View File
@@ -286,13 +286,14 @@ Value* LessThanIntFn(const char* name, State* state, int argc, Expr* argv[]) {
bool result = false;
char* end;
long l_int = strtol(left, &end, 10);
// Parse up to at least long long or 64-bit integers.
int64_t l_int = static_cast<int64_t>(strtoll(left, &end, 10));
if (left[0] == '\0' || *end != '\0') {
goto done;
}
long r_int;
r_int = strtol(right, &end, 10);
int64_t r_int;
r_int = static_cast<int64_t>(strtoll(right, &end, 10));
if (right[0] == '\0' || *end != '\0') {
goto done;
}