[libxml2] Fix pointer comparison warnings on 64-bit Windows
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix pointer comparison warnings on 64-bit Windows
- Date: Sat, 21 Oct 2017 13:21:21 +0000 (UTC)
commit a4864c2f98f2a093402e6a4bb14a10af45025f40
Author: J. Peter Mugaas <jpmugaas suddenlink net>
Date: Sat Oct 21 14:01:10 2017 +0200
Fix pointer comparison warnings on 64-bit Windows
nanoftp.c | 2 +-
nanohttp.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/nanoftp.c b/nanoftp.c
index 4458497..54fa026 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -901,7 +901,7 @@ xmlNanoFTPConnect(void *ctx) {
__xmlIOErr(XML_FROM_FTP, 0, "getaddrinfo failed");
return (-1);
}
- if (tmp->ai_addrlen > sizeof(ctxt->ftpAddr)) {
+ if ((size_t)tmp->ai_addrlen > sizeof(ctxt->ftpAddr)) {
if (result)
freeaddrinfo (result);
__xmlIOErr(XML_FROM_FTP, 0, "gethostbyname address mismatch");
diff --git a/nanohttp.c b/nanohttp.c
index d7bc013..9cd2292 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -1088,7 +1088,7 @@ xmlNanoHTTPConnectHost(const char *host, int port)
for (res = result; res; res = res->ai_next) {
if (res->ai_family == AF_INET) {
- if (res->ai_addrlen > sizeof(sockin)) {
+ if ((size_t)res->ai_addrlen > sizeof(sockin)) {
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
freeaddrinfo (result);
return INVALID_SOCKET;
@@ -1098,7 +1098,7 @@ xmlNanoHTTPConnectHost(const char *host, int port)
addr = (struct sockaddr *)&sockin;
#ifdef SUPPORT_IP6
} else if (have_ipv6 () && (res->ai_family == AF_INET6)) {
- if (res->ai_addrlen > sizeof(sockin6)) {
+ if ((size_t)res->ai_addrlen > sizeof(sockin6)) {
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
freeaddrinfo (result);
return INVALID_SOCKET;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]