diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-11-14 07:24:07 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-11-16 14:42:02 +0300 |
commit | 9bce68663b53dea4365445f4dfb3541a92bac1fe (patch) | |
tree | 02b7c6dc7492230dc9de8c8fa5814084909c9457 /src/node_os.cc | |
parent | 39a5e7dbb0471313f4f00ee4f1eb51ee0ada61e6 (diff) |
src: fix compiler warning in node_os
Currently the following compiler warnings is generated:
../src/node_os.cc:167:24:
warning: comparison of integers of different signs: 'size_t'
(aka 'unsigned long') and 'int' [-Wsign-compare]
for (size_t i = 0; i < count; i++) {
~ ^ ~~~~~
1 warning generated.
This commit changes the type of i to int.
PR-URL: https://github.com/nodejs/node/pull/24356
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/node_os.cc')
-rw-r--r-- | src/node_os.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_os.cc b/src/node_os.cc index 0b46af95f4b..9e5530646a3 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -163,7 +163,7 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) { // The array is in the format // [model, speed, (5 entries of cpu_times), model2, speed2, ...] std::vector<Local<Value>> result(count * 7); - for (size_t i = 0; i < count; i++) { + for (int i = 0; i < count; i++) { uv_cpu_info_t* ci = cpu_infos + i; result[i * 7] = OneByteString(isolate, ci->model); result[i * 7 + 1] = Number::New(isolate, ci->speed); |