Skip to content

Commit 2d885ed

Browse files
danbevrvagg
authored andcommitted
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: #24356 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 806570d commit 2d885ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_os.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
163163
// The array is in the format
164164
// [model, speed, (5 entries of cpu_times), model2, speed2, ...]
165165
std::vector<Local<Value>> result(count * 7);
166-
for (size_t i = 0; i < count; i++) {
166+
for (int i = 0; i < count; i++) {
167167
uv_cpu_info_t* ci = cpu_infos + i;
168168
result[i * 7] = OneByteString(isolate, ci->model);
169169
result[i * 7 + 1] = Number::New(isolate, ci->speed);

0 commit comments

Comments
 (0)