From 4d7b149649530cf708c33127aa87d5f8259bc620 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sun, 21 Mar 2021 10:16:06 -0700 Subject: [PATCH] mingw: cast fixes --- ixwebsocket/IXNetSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ixwebsocket/IXNetSystem.cpp b/ixwebsocket/IXNetSystem.cpp index 72b9cf2f..05a28c0b 100644 --- a/ixwebsocket/IXNetSystem.cpp +++ b/ixwebsocket/IXNetSystem.cpp @@ -132,7 +132,7 @@ namespace ix #if defined(_WIN32) && defined(__GNUC__) const char* inet_ntop(int af, const void* a0, char* s, socklen_t l) { - const unsigned char *a = a0; + const unsigned char *a = (const unsigned char*) a0; int i, j, max, best; char buf[100]; @@ -190,7 +190,7 @@ static int hexval(unsigned c) int inet_pton(int af, const char* s, void* a0) { uint16_t ip[8]; - unsigned char *a = a0; + unsigned char *a = (unsigned char*) a0; int i, j, v, d, brk=-1, need_v4=0; if (af==AF_INET) { @@ -241,7 +241,7 @@ int inet_pton(int af, const char* s, void* a0) *a++ = ip[j]>>8; *a++ = ip[j]; } - if (need_v4 && inet_pton(AF_INET, (void *)s, a-4) <= 0) return 0; + if (need_v4 && inet_pton(AF_INET, (const char *)s, a-4) <= 0) return 0; return 1; } #endif // defined(_WIN32) && defined(__GNUC__)