win: fix compiler warnings (#4860)

This commit is contained in:
Savas Sahin 2025-08-20 22:17:02 +03:00 committed by GitHub
parent 3d9d7c7ef6
commit 3b1ac021e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -279,7 +279,7 @@ typedef struct {
DWORD tls_index; DWORD tls_index;
} uv_key_t; } uv_key_t;
#define UV_ONCE_INIT { 0, NULL } #define UV_ONCE_INIT { 0, { NULL } }
typedef struct uv_once_s { typedef struct uv_once_s {
unsigned char unused; unsigned char unused;

View File

@ -1158,7 +1158,7 @@ int uv__udp_try_send2(uv_udp_t* handle,
for (i = 0; i < (int) count; i++) { for (i = 0; i < (int) count; i++) {
r = uv_udp_try_send(handle, bufs[i], nbufs[i], addrs[i]); r = uv_udp_try_send(handle, bufs[i], nbufs[i], addrs[i]);
if (r < 0) if (r < 0)
return i > 0 ? i : r; /* Error if first packet, else send count. */ return i > 0 ? i : (int) r; /* Error if first packet, else send count. */
} }
return i; return i;

View File

@ -521,7 +521,7 @@ unsigned int uv_available_parallelism(void) {
*/ */
count = 0; count = 0;
if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask)) if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask))
for (i = 0; i < 8 * sizeof(procmask); i++) for (i = 0; i < 8u * sizeof(procmask); i++)
count += 1 & (procmask >> i); count += 1 & (procmask >> i);
if (count > 0) if (count > 0)