build: fix build warning on cygwin
Signed-off-by: MaYuming <maym@appexnetworks.com> PR-URL: https://github.com/libuv/libuv/pull/2489 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
This commit is contained in:
parent
edbf293479
commit
0ff717e39c
@ -69,7 +69,9 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
|
||||
struct ifaddrs* addrs;
|
||||
struct ifaddrs* ent;
|
||||
uv_interface_address_t* address;
|
||||
#if !(defined(__CYGWIN__) || defined(__MSYS__))
|
||||
int i;
|
||||
#endif
|
||||
|
||||
*count = 0;
|
||||
*addresses = NULL;
|
||||
|
||||
@ -261,7 +261,7 @@ static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
|
||||
addrlen = strlen(sa.sun_path);
|
||||
|
||||
|
||||
if (addrlen >= *size) {
|
||||
if ((size_t)addrlen >= *size) {
|
||||
*size = addrlen + 1;
|
||||
return UV_ENOBUFS;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user