From aaccd9f5db68611bc45e5e7356fee207d486cdf3 Mon Sep 17 00:00:00 2001 From: William Wong Date: Thu, 3 Apr 2014 15:09:32 +0800 Subject: [PATCH] Fix compile errors with mingw64 Fix two errors: win32.c:36:9: error: format '%s' expects argument of type 'char *', but argument 5 has type 'void **' [-Werror=format=] LOGE("%s: %s", s, msg); ^ and win32.c:47:9: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'int' [-Werror=format=] LOGE("ioctlsocket failed with error: %ld\n", iResult); ^ --- src/win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win32.c b/src/win32.c index 539a5033..c00f5f9e 100644 --- a/src/win32.c +++ b/src/win32.c @@ -33,7 +33,7 @@ void ss_error(const char *s) MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msg, 0, NULL); if (msg != NULL) { - LOGE("%s: %s", s, msg); + LOGE("%s: %s", s, (char *)msg); LocalFree(msg); } } @@ -41,7 +41,7 @@ void ss_error(const char *s) int setnonblocking(int fd) { u_long iMode = 0; - int iResult; + long int iResult; iResult = ioctlsocket(fd, FIONBIO, &iMode); if (iResult != NO_ERROR) { LOGE("ioctlsocket failed with error: %ld\n", iResult);