From 107ca5393ee65a7d8c79be4164c51f9bacba3fdd Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 25 Oct 2018 20:23:54 +0200 Subject: [PATCH] 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;