Revision: 3827
Author: [email protected]
Date: Wed Feb 10 03:48:53 2010
Log: Making lint happy.
Review URL: http://codereview.chromium.org/593014
http://code.google.com/p/v8/source/detail?r=3827
Modified:
/branches/bleeding_edge/samples/lineprocessor.cc
/branches/bleeding_edge/src/d8-readline.cc
/branches/bleeding_edge/test/cctest/test-debug.cc
=======================================
--- /branches/bleeding_edge/samples/lineprocessor.cc Wed Jan 20 09:06:23
2010
+++ /branches/bleeding_edge/samples/lineprocessor.cc Wed Feb 10 03:48:53
2010
@@ -152,7 +152,7 @@
} else if (strcmp(str, "--main-cycle-in-js") == 0) {
cycle_type = CycleInJs;
} else if (strcmp(str, "-p") == 0 && i + 1 < argc) {
- port_number = atoi(argv[i + 1]);
+ port_number = atoi(argv[i + 1]); // NOLINT
i++;
} else if (strncmp(str, "--", 2) == 0) {
printf("Warning: unknown flag %s.\nTry --help for options\n", str);
=======================================
--- /branches/bleeding_edge/src/d8-readline.cc Wed Mar 18 05:27:37 2009
+++ /branches/bleeding_edge/src/d8-readline.cc Wed Feb 10 03:48:53 2010
@@ -27,8 +27,8 @@
#include <cstdio> // NOLINT
-#include <readline/readline.h>
-#include <readline/history.h>
+#include <readline/readline.h> // NOLINT
+#include <readline/history.h> // NOLINT
#include "d8.h"
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Fri Jan 29 04:41:11
2010
+++ /branches/bleeding_edge/test/cctest/test-debug.cc Wed Feb 10 03:48:53
2010
@@ -3882,6 +3882,11 @@
return strstr(message, type_response) != NULL &&
strstr(message, command_evaluate) != NULL;
}
+
+
+static int StringToInt(const char* s) {
+ return atoi(s); // NOLINT
+}
// We match parts of the message to get evaluate result int value.
@@ -3892,7 +3897,7 @@
return -1;
}
int res = -1;
- res = atoi(pos + strlen(value));
+ res = StringToInt(pos + strlen(value));
return res;
}
@@ -3905,7 +3910,7 @@
return -1;
}
int res = -1;
- res = atoi(pos + strlen(breakpoints));
+ res = StringToInt(pos + strlen(breakpoints));
return res;
}
@@ -3918,11 +3923,7 @@
return -1;
}
pos += strlen(prefix);
- char* pos_end = pos;
- int res = static_cast<int>(strtol(pos, &pos_end, 10));
- if (pos_end == pos) {
- return -1;
- }
+ int res = StringToInt(pos);
return res;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev