From be16d8d9942afd23d9cad1fc5e80b0e90535cfff Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Sun, 13 Oct 2019 11:13:34 +0200 Subject: connect: silence sign-compare warning With MinGW-w64 using WinSock, `curl_socklen_t` is signed, while the result of `sizeof` is unsigned. Closes https://github.com/curl/curl/pull/4483 --- lib/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connect.c b/lib/connect.c index bb2275e4d..4c8c956a4 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -665,7 +665,7 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen, #endif #if defined(HAVE_SYS_UN_H) && defined(AF_UNIX) case AF_UNIX: - if(salen > sizeof(sa_family_t)) { + if(salen > (curl_socklen_t)sizeof(sa_family_t)) { su = (struct sockaddr_un*)sa; msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path); } -- cgit v1.2.1