Making lint happy.

Review URL: http://codereview.chromium.org/593014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
antonm@chromium.org 2010-02-10 11:48:53 +00:00
parent 30cf88af6b
commit a9664cbd0d
3 changed files with 11 additions and 10 deletions

View File

@ -152,7 +152,7 @@ int RunMain(int argc, char* argv[]) {
} 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);

View File

@ -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"

View File

@ -3884,6 +3884,11 @@ bool IsEvaluateResponseMessage(char* message) {
}
static int StringToInt(const char* s) {
return atoi(s); // NOLINT
}
// We match parts of the message to get evaluate result int value.
int GetEvaluateIntResult(char *message) {
const char* value = "\"value\":";
@ -3892,7 +3897,7 @@ int GetEvaluateIntResult(char *message) {
return -1;
}
int res = -1;
res = atoi(pos + strlen(value));
res = StringToInt(pos + strlen(value));
return res;
}
@ -3905,7 +3910,7 @@ int GetBreakpointIdFromBreakEventMessage(char *message) {
return -1;
}
int res = -1;
res = atoi(pos + strlen(breakpoints));
res = StringToInt(pos + strlen(breakpoints));
return res;
}
@ -3918,11 +3923,7 @@ int GetTotalFramesInt(char *message) {
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;
}