dlls/wininet: fix compiler warnings on mingw32
Austin English
austinenglish at gmail.com
Thu Jul 1 12:28:02 CDT 2010
../../../wineclean/dlls/wininet/cookie.c:434: warning: unknown
conversion type character ‘z’ in format
../../../wineclean/dlls/wininet/cookie.c:434: warning: too many
arguments for format
../../../wineclean/dlls/wininet/cookie.c:460: warning: unknown
conversion type character ‘z’ in format
../../../wineclean/dlls/wininet/cookie.c:460: warning: too many
arguments for format
../../../wineclean/dlls/wininet/ftp.c:1237: warning: pointer targets
in passing argument 2 of ‘recv’ differ in signedness
../../../wineclean/dlls/wininet/ftp.c:1266: warning: pointer targets
in passing argument 3 of ‘ioctlsocket’ differ in signedness
../../../wineclean/dlls/wininet/ftp.c:1280: warning: pointer targets
in passing argument 2 of ‘recv’ differ in signedness
../../../wineclean/dlls/wininet/ftp.c:2552: warning: pointer targets
in passing argument 4 of ‘GetAddress’ differ in signedness
../../../wineclean/dlls/wininet/ftp.c:2593: warning: pointer targets
in passing argument 3 of ‘getsockname’ differ in signedness
../../../wineclean/dlls/wininet/http.c:1418: warning: passing argument
2 of ‘inet_ntop’ discards qualifiers from pointer target type
../../../wineclean/dlls/wininet/http.c:4359: warning: passing argument
2 of ‘inet_ntop’ discards qualifiers from pointer target type
../../../wineclean/dlls/wininet/netconnection.c:811: warning: pointer
targets in passing argument 3 of ‘ioctlsocket’ differ in signedness
--
-Austin
-------------- next part --------------
diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c
index 75cf049..7dfd2a8 100644
--- a/dlls/wininet/cookie.c
+++ b/dlls/wininet/cookie.c
@@ -431,7 +431,7 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST
value = data = heap_strdupW(cookie_data);
if (!data)
{
- ERR("could not allocate %zu bytes for the cookie data buffer\n", (strlenW(cookie_data) + 1) * sizeof(WCHAR));
+ ERR("could not allocate the cookie data buffer\n");
return FALSE;
}
@@ -457,7 +457,7 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST
if (value == NULL)
{
HeapFree(GetProcessHeap(), 0, data);
- ERR("could not allocate %zu bytes for the cookie value buffer\n", (ptr - data) * sizeof(WCHAR));
+ ERR("could not allocate the cookie value buffer\n");
return FALSE;
}
strcpyW(value, data);
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 80cc6f0..2d39fe4 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -1229,7 +1229,11 @@ static DWORD FTPFILE_WriteFile(object_header_t *hdr, const void *buffer, DWORD s
static void FTP_ReceiveRequestData(ftp_file_t *file, BOOL first_notif)
{
INTERNET_ASYNC_RESULT iar;
+#ifdef __MINGW32__
+ char buffer[4096];
+#else
BYTE buffer[4096];
+#endif
int available;
TRACE("%p\n", file);
@@ -1258,7 +1262,12 @@ static void FTPFILE_AsyncQueryDataAvailableProc(WORKREQUEST *workRequest)
static DWORD FTPFILE_QueryDataAvailable(object_header_t *hdr, DWORD *available, DWORD flags, DWORD_PTR ctx)
{
ftp_file_t *file = (ftp_file_t*) hdr;
- int retval, unread = 0;
+ int retval;
+#ifdef __MINGW32__
+ ULONG unread;
+#else
+ int unread = 0;
+#endif
TRACE("(%p %p %x %lx)\n", file, available, flags, ctx);
@@ -1273,7 +1282,11 @@ static DWORD FTPFILE_QueryDataAvailable(object_header_t *hdr, DWORD *available,
*available = unread;
if(!unread) {
+ #ifdef __MINGW32__
+ char byte;
+ #else
BYTE byte;
+ #endif
*available = 0;
@@ -2446,7 +2459,11 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
static const WCHAR szEmpty[] = {'\0'};
struct sockaddr_in socketAddr;
INT nsocket = -1;
+#ifdef __MINGW32__
+ socklen_t sock_namelen;
+#else
UINT sock_namelen;
+#endif
BOOL bSuccess = FALSE;
ftp_session_t *lpwfs = NULL;
HINTERNET handle = NULL;
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 4b4bc5b..2354617 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1391,7 +1391,11 @@ static DWORD HTTP_ResolveName(http_request_t *lpwhr)
{
char szaddr[INET6_ADDRSTRLEN];
http_session_t *lpwhs = lpwhr->lpHttpSession;
+#ifdef __MINGW32__
+ PVOID addr;
+#else
const void *addr;
+#endif
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_RESOLVING_NAME,
@@ -4325,7 +4329,11 @@ static DWORD HTTP_OpenConnection(http_request_t *lpwhr)
http_session_t *lpwhs;
appinfo_t *hIC = NULL;
char szaddr[INET6_ADDRSTRLEN];
+#ifdef __MINGW32__
+ PVOID addr;
+#else
const void *addr;
+#endif
DWORD res = ERROR_SUCCESS;
TRACE("-->\n");
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index abd7415..5639779 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -807,7 +807,11 @@ BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *avail
if (!connection->useSSL)
{
#ifdef FIONREAD
+#ifdef __MINGW32__
+ ULONG unread;
+#else
int unread;
+#endif /* __MINGW32__ */
int retval = ioctlsocket(connection->socketFD, FIONREAD, &unread);
if (!retval)
{
More information about the wine-patches
mailing list