From 211e40e7777a684e27ce62bb7c3480839b839da2 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 25 Oct 2018 20:22:20 +0200 Subject: [PATCH 1/3] src: include util-inl.h in worker_agent.cc Otherwise, the compiler complains about a missing definition for the (inline) `Calloc` function. --- src/inspector/worker_agent.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/inspector/worker_agent.cc b/src/inspector/worker_agent.cc index fccd6d57a53c2a..d343de8494a36f 100644 --- a/src/inspector/worker_agent.cc +++ b/src/inspector/worker_agent.cc @@ -2,6 +2,7 @@ #include "main_thread_interface.h" #include "worker_inspector.h" +#include "util-inl.h" namespace node { namespace inspector { From 107ca5393ee65a7d8c79be4164c51f9bacba3fdd Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 25 Oct 2018 20:23:54 +0200 Subject: [PATCH 2/3] src: make model counter in `GetCPUInfo()` unsigned This fixes a compiler warning about comparing against the (unsigned) `NODE_PUSH_VAL_TO_ARRAY_MAX` constant. --- src/node_os.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_os.cc b/src/node_os.cc index d3e9460f473122..6e209b2ceec71c 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -168,7 +168,7 @@ static void GetCPUInfo(const FunctionCallbackInfo& args) { Local cpus = args[2].As(); Local model_argv[NODE_PUSH_VAL_TO_ARRAY_MAX]; - int model_idx = 0; + unsigned int model_idx = 0; for (i = 0, field_idx = 0; i < count; i++) { uv_cpu_info_t* ci = cpu_infos + i; From 7b0396c71dad80b887803039a320eb8c95f52405 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 25 Oct 2018 20:24:27 +0200 Subject: [PATCH 3/3] src: remove unused variables These have been overlooked in 036fbdb63d603a64bd8562ec9331dfb7a5c5075c. --- src/node_trace_events.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/node_trace_events.cc b/src/node_trace_events.cc index ce60cde2d0d433..5269ad332ed151 100644 --- a/src/node_trace_events.cc +++ b/src/node_trace_events.cc @@ -62,7 +62,6 @@ void NodeCategorySet::New(const FunctionCallbackInfo& args) { } void NodeCategorySet::Enable(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); NodeCategorySet* category_set; ASSIGN_OR_RETURN_UNWRAP(&category_set, args.Holder()); CHECK_NOT_NULL(category_set); @@ -74,7 +73,6 @@ void NodeCategorySet::Enable(const FunctionCallbackInfo& args) { } void NodeCategorySet::Disable(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); NodeCategorySet* category_set; ASSIGN_OR_RETURN_UNWRAP(&category_set, args.Holder()); CHECK_NOT_NULL(category_set);