Skip to content

Commit

Permalink
src: fix VC++ warning C4244
Browse files Browse the repository at this point in the history
Reviewed-by: Trevor Norris <[email protected]>
  • Loading branch information
zerhacken authored and trevnorris committed Sep 29, 2014
1 parent f4df805 commit 734fb49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,7 @@ static void InitGroups(const FunctionCallbackInfo<Value>& args) {
void Exit(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
HandleScope scope(env->isolate());
exit(args[0]->IntegerValue());
exit(args[0]->Int32Value());
}


Expand Down Expand Up @@ -1993,7 +1993,7 @@ void Kill(const FunctionCallbackInfo<Value>& args) {
return env->ThrowError("Bad argument.");
}

int pid = args[0]->IntegerValue();
int pid = args[0]->Int32Value();
int sig = args[1]->Int32Value();
int err = uv_kill(pid, sig);
args.GetReturnValue().Set(err);
Expand Down Expand Up @@ -2502,7 +2502,7 @@ static void DebugPortSetter(Local<String> property,
const PropertyCallbackInfo<void>& info) {
Environment* env = Environment::GetCurrent(info.GetIsolate());
HandleScope scope(env->isolate());
debug_port = value->NumberValue();
debug_port = value->Int32Value();
}


Expand Down Expand Up @@ -3375,7 +3375,7 @@ void Init(int* argc,
int* exec_argc,
const char*** exec_argv) {
// Initialize prog_start_time to get relative uptime.
prog_start_time = uv_now(uv_default_loop());
prog_start_time = static_cast<double>(uv_now(uv_default_loop()));

// Make inherited handles noninheritable.
uv_disable_stdio_inheritance();
Expand Down Expand Up @@ -3530,7 +3530,7 @@ int EmitExit(Environment* env) {
process_object->Set(env->exiting_string(), True(env->isolate()));

Handle<String> exitCode = env->exit_code_string();
int code = process_object->Get(exitCode)->IntegerValue();
int code = process_object->Get(exitCode)->Int32Value();

Local<Value> args[] = {
env->exit_string(),
Expand All @@ -3540,7 +3540,7 @@ int EmitExit(Environment* env) {
MakeCallback(env, process_object, "emit", ARRAY_SIZE(args), args);

// Reload exit code, it may be changed by `emit('exit')`
return process_object->Get(exitCode)->IntegerValue();
return process_object->Get(exitCode)->Int32Value();
}


Expand Down

0 comments on commit 734fb49

Please sign in to comment.