Skip to content
Permalink
Browse files

src: make model counter in `GetCPUInfo()` unsigned

This fixes a compiler warning about comparing against
the (unsigned) `NODE_PUSH_VAL_TO_ARRAY_MAX` constant.

PR-URL: #23880
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
  • Loading branch information...
addaleax committed Oct 25, 2018
1 parent 1ba10db commit b0089a580fcf3605d46498db65a770c63875e2f8
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/node_os.cc
@@ -168,7 +168,7 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
Local<Array> cpus = args[2].As<Array>();

Local<Value> 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;

0 comments on commit b0089a5

Please sign in to comment.
You can’t perform that action at this time.