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:
MaYuming 2019-09-25 18:50:07 +08:00 committed by Saúl Ibarra Corretgé
parent edbf293479
commit 0ff717e39c
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -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;
}