win: fix -Wsign-compare warnings (#4835)

This commit is contained in:
Ben Noordhuis 2025-07-15 23:01:38 +02:00 committed by GitHub
parent 6f3199dd3f
commit 4887c09cf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -1149,10 +1149,13 @@ int uv__udp_try_send2(uv_udp_t* handle,
uv_buf_t* bufs[/*count*/],
unsigned int nbufs[/*count*/],
struct sockaddr* addrs[/*count*/]) {
unsigned int i;
int i;
int r;
for (i = 0; i < count; i++) {
if (count > INT_MAX)
return UV_EINVAL;
for (i = 0; i < (int) count; i++) {
r = uv_udp_try_send(handle, bufs[i], nbufs[i], addrs[i]);
if (r < 0)
return i > 0 ? i : r; /* Error if first packet, else send count. */

View File

@ -513,8 +513,8 @@ int uv_uptime(double* uptime) {
unsigned int uv_available_parallelism(void) {
DWORD_PTR procmask;
DWORD_PTR sysmask;
int count;
int i;
unsigned count;
unsigned i;
/* TODO(bnoordhuis) Use GetLogicalProcessorInformationEx() to support systems
* with > 64 CPUs? See https://github.com/libuv/libuv/pull/3458