From b0089a580fcf3605d46498db65a770c63875e2f8 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a compiler warning about comparing against the (unsigned) `NODE_PUSH_VAL_TO_ARRAY_MAX` constant. PR-URL: https://github.com/nodejs/node/pull/23880 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts Reviewed-By: Luigi Pinca Reviewed-By: Eugene Ostroukhov Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Matheus Marchini --- 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;