From 734fb49a2af580f2d9c97a0bdd82ad3e6a1f64a2 Mon Sep 17 00:00:00 2001 From: Rasmus Christian Pedersen Date: Thu, 18 Sep 2014 14:10:53 +0200 Subject: [PATCH] src: fix VC++ warning C4244 Reviewed-by: Trevor Norris --- src/node.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/node.cc b/src/node.cc index 2223c36983..cf8f4ccbb5 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1941,7 +1941,7 @@ static void InitGroups(const FunctionCallbackInfo& args) { void Exit(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args.GetIsolate()); HandleScope scope(env->isolate()); - exit(args[0]->IntegerValue()); + exit(args[0]->Int32Value()); } @@ -1993,7 +1993,7 @@ void Kill(const FunctionCallbackInfo& 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); @@ -2502,7 +2502,7 @@ static void DebugPortSetter(Local property, const PropertyCallbackInfo& info) { Environment* env = Environment::GetCurrent(info.GetIsolate()); HandleScope scope(env->isolate()); - debug_port = value->NumberValue(); + debug_port = value->Int32Value(); } @@ -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(uv_now(uv_default_loop())); // Make inherited handles noninheritable. uv_disable_stdio_inheritance(); @@ -3530,7 +3530,7 @@ int EmitExit(Environment* env) { process_object->Set(env->exiting_string(), True(env->isolate())); Handle exitCode = env->exit_code_string(); - int code = process_object->Get(exitCode)->IntegerValue(); + int code = process_object->Get(exitCode)->Int32Value(); Local args[] = { env->exit_string(), @@ -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(); }