Reviewers: Søren Gjesse,
Message:
[email protected]
Hi Soren
I used "strtol" instead of "atoi" trying to better handle parse error.
As a result I have to conceal "long" type that comes with "strtol".
Probably it's fine.
However does this mean I shouldn't have used "strtol" at all?
Peter
Description:
Fix lint error with strtol in test
Please review this at http://codereview.chromium.org/549111
Affected files:
M test/cctest/test-debug.cc
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index
36b27e7f997c8a0fcaa391b7f81daa90d2cc7b0f..c79ab6a5eb0bdb0ccc28fd4ee841bdbcff687793
100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -3881,11 +3881,11 @@ int GetTotalFramesInt(char *message) {
}
pos += strlen(prefix);
char* pos_end = pos;
- long res = strtol(pos, &pos_end, 10);
+ int res = static_cast<int>(strtol(pos, &pos_end, 10));
if (pos_end == pos) {
return -1;
}
- return static_cast<int>(res);
+ return res;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev