Skip to content

Commit

Permalink
src: make model counter in GetCPUInfo() unsigned
Browse files Browse the repository at this point in the history
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 authored and targos committed Oct 28, 2018
1 parent 11e9425 commit 682e06e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_os.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 682e06e

Please sign in to comment.