aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2016-04-18 13:30:55 -0500
committerChih-Hung Hsieh2016-04-18 14:29:30 -0500
commit54a2747ef305c10d07d8db393125dbcbb461c428 (patch)
treead6f90bea569c5f01bbf9485e356dcdb035d79c5 /edify/expr.cpp
parent51dcd0da37dd10238017bae03fc708dc6e05bb56 (diff)
downloadplatform-bootable-recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.gz
platform-bootable-recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.xz
platform-bootable-recovery-54a2747ef305c10d07d8db393125dbcbb461c428.zip
Fix google-runtime-int warnings.
Bug: 28220065 Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592
Diffstat (limited to 'edify/expr.cpp')
-rw-r--r--edify/expr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/edify/expr.cpp b/edify/expr.cpp
index cd1e0872..c34342f7 100644
--- a/edify/expr.cpp
+++ b/edify/expr.cpp
@@ -286,13 +286,14 @@ Value* LessThanIntFn(const char* name, State* state, int argc, Expr* argv[]) {
286 bool result = false; 286 bool result = false;
287 char* end; 287 char* end;
288 288
289 long l_int = strtol(left, &end, 10); 289 // Parse up to at least long long or 64-bit integers.
290 int64_t l_int = static_cast<int64_t>(strtoll(left, &end, 10));
290 if (left[0] == '\0' || *end != '\0') { 291 if (left[0] == '\0' || *end != '\0') {
291 goto done; 292 goto done;
292 } 293 }
293 294
294 long r_int; 295 int64_t r_int;
295 r_int = strtol(right, &end, 10); 296 r_int = static_cast<int64_t>(strtoll(right, &end, 10));
296 if (right[0] == '\0' || *end != '\0') { 297 if (right[0] == '\0' || *end != '\0') {
297 goto done; 298 goto done;
298 } 299 }