win: fix compiler warnings (#4860)
This commit is contained in:
parent
3d9d7c7ef6
commit
3b1ac021e3
@ -279,7 +279,7 @@ typedef struct {
|
||||
DWORD tls_index;
|
||||
} uv_key_t;
|
||||
|
||||
#define UV_ONCE_INIT { 0, NULL }
|
||||
#define UV_ONCE_INIT { 0, { NULL } }
|
||||
|
||||
typedef struct uv_once_s {
|
||||
unsigned char unused;
|
||||
|
||||
@ -1158,7 +1158,7 @@ int uv__udp_try_send2(uv_udp_t* handle,
|
||||
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. */
|
||||
return i > 0 ? i : (int) r; /* Error if first packet, else send count. */
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
@ -521,7 +521,7 @@ unsigned int uv_available_parallelism(void) {
|
||||
*/
|
||||
count = 0;
|
||||
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);
|
||||
|
||||
if (count > 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user