Commit 13b6ce6d authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix warnings generated with -Wsign-compare.

parent 544c85ee
...@@ -849,7 +849,7 @@ BOOL WINAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszC ...@@ -849,7 +849,7 @@ BOOL WINAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszC
{ {
if (nResCode == 257) /* Extract directory name */ if (nResCode == 257) /* Extract directory name */
{ {
INT firstpos, lastpos, len; DWORD firstpos, lastpos, len;
LPWSTR lpszResponseBuffer = WININET_strdup_AtoW(INTERNET_GetResponseBuffer()); LPWSTR lpszResponseBuffer = WININET_strdup_AtoW(INTERNET_GetResponseBuffer());
for (firstpos = 0, lastpos = 0; lpszResponseBuffer[lastpos]; lastpos++) for (firstpos = 0, lastpos = 0; lpszResponseBuffer[lastpos]; lastpos++)
...@@ -1823,7 +1823,7 @@ BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam, ...@@ -1823,7 +1823,7 @@ BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
DWORD len; DWORD len;
CHAR *buf; CHAR *buf;
DWORD nBytesSent = 0; DWORD nBytesSent = 0;
DWORD nRC = 0; int nRC = 0;
DWORD dwParamLen; DWORD dwParamLen;
TRACE("%d: (%s) %d\n", ftpCmd, lpszParam, nSocket); TRACE("%d: (%s) %d\n", ftpCmd, lpszParam, nSocket);
...@@ -2409,7 +2409,8 @@ BOOL FTP_SendData(LPWININETFTPSESSIONW lpwfs, INT nDataSocket, HANDLE hFile) ...@@ -2409,7 +2409,8 @@ BOOL FTP_SendData(LPWININETFTPSESSIONW lpwfs, INT nDataSocket, HANDLE hFile)
DWORD nBytesRead = 0; DWORD nBytesRead = 0;
DWORD nBytesSent = 0; DWORD nBytesSent = 0;
DWORD nTotalSent = 0; DWORD nTotalSent = 0;
DWORD nBytesToSend, nLen, nRC = 1; DWORD nBytesToSend, nLen;
int nRC = 1;
time_t s_long_time, e_long_time; time_t s_long_time, e_long_time;
LONG nSeconds; LONG nSeconds;
CHAR *lpszBuffer; CHAR *lpszBuffer;
...@@ -2627,7 +2628,7 @@ static void FTP_CloseSessionHandle(LPWININETHANDLEHEADER hdr) ...@@ -2627,7 +2628,7 @@ static void FTP_CloseSessionHandle(LPWININETHANDLEHEADER hdr)
static void FTP_CloseFindNextHandle(LPWININETHANDLEHEADER hdr) static void FTP_CloseFindNextHandle(LPWININETHANDLEHEADER hdr)
{ {
LPWININETFINDNEXTW lpwfn = (LPWININETFINDNEXTW) hdr; LPWININETFINDNEXTW lpwfn = (LPWININETFINDNEXTW) hdr;
INT i; DWORD i;
TRACE("\n"); TRACE("\n");
......
...@@ -97,7 +97,7 @@ BOOL HTTP_InterpretHttpHeader(LPWSTR buffer, LPWSTR field, INT fieldlen, LPWSTR ...@@ -97,7 +97,7 @@ BOOL HTTP_InterpretHttpHeader(LPWSTR buffer, LPWSTR field, INT fieldlen, LPWSTR
INT HTTP_GetStdHeaderIndex(LPCWSTR lpszField); INT HTTP_GetStdHeaderIndex(LPCWSTR lpszField);
BOOL HTTP_InsertCustomHeader(LPWININETHTTPREQW lpwhr, LPHTTPHEADERW lpHdr); BOOL HTTP_InsertCustomHeader(LPWININETHTTPREQW lpwhr, LPHTTPHEADERW lpHdr);
INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField); INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField);
BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, INT index); BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, DWORD index);
/*********************************************************************** /***********************************************************************
* HTTP_Tokenize (internal) * HTTP_Tokenize (internal)
...@@ -118,7 +118,7 @@ static LPWSTR * HTTP_Tokenize(LPCWSTR string, LPCWSTR token_string) ...@@ -118,7 +118,7 @@ static LPWSTR * HTTP_Tokenize(LPCWSTR string, LPCWSTR token_string)
for (i = 0; string[i]; i++) for (i = 0; string[i]; i++)
if (!strncmpW(string+i, token_string, strlenW(token_string))) if (!strncmpW(string+i, token_string, strlenW(token_string)))
{ {
int j; DWORD j;
tokens++; tokens++;
/* we want to skip over separators, but not the null terminator */ /* we want to skip over separators, but not the null terminator */
for (j = 0; j < strlenW(token_string) - 1; j++) for (j = 0; j < strlenW(token_string) - 1; j++)
...@@ -266,7 +266,7 @@ BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, ...@@ -266,7 +266,7 @@ BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest,
len = MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, NULL, 0 ); len = MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, NULL, 0 );
hdr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); hdr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, hdr, len ); MultiByteToWideChar( CP_ACP, 0, lpszHeader, dwHeaderLength, hdr, len );
if( dwHeaderLength != -1 ) if( dwHeaderLength != ~0UL )
dwHeaderLength = len; dwHeaderLength = len;
r = HttpAddRequestHeadersW( hHttpRequest, hdr, dwHeaderLength, dwModifier ); r = HttpAddRequestHeadersW( hHttpRequest, hdr, dwHeaderLength, dwModifier );
...@@ -854,7 +854,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel, ...@@ -854,7 +854,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel,
if (index == HTTP_QUERY_RAW_HEADERS_CRLF) if (index == HTTP_QUERY_RAW_HEADERS_CRLF)
{ {
int len = strlenW(lpwhr->lpszRawHeaders); DWORD len = strlenW(lpwhr->lpszRawHeaders);
if (len + 1 > *lpdwBufferLength/sizeof(WCHAR)) if (len + 1 > *lpdwBufferLength/sizeof(WCHAR))
{ {
*lpdwBufferLength = (len + 1) * sizeof(WCHAR); *lpdwBufferLength = (len + 1) * sizeof(WCHAR);
...@@ -872,8 +872,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel, ...@@ -872,8 +872,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel,
{ {
static const WCHAR szCrLf[] = {'\r','\n',0}; static const WCHAR szCrLf[] = {'\r','\n',0};
LPWSTR * ppszRawHeaderLines = HTTP_Tokenize(lpwhr->lpszRawHeaders, szCrLf); LPWSTR * ppszRawHeaderLines = HTTP_Tokenize(lpwhr->lpszRawHeaders, szCrLf);
int size = 0; DWORD i, size = 0;
int i;
LPWSTR pszString = (WCHAR*)lpBuffer; LPWSTR pszString = (WCHAR*)lpBuffer;
for (i = 0; ppszRawHeaderLines[i]; i++) for (i = 0; ppszRawHeaderLines[i]; i++)
...@@ -889,7 +888,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel, ...@@ -889,7 +888,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel,
for (i = 0; ppszRawHeaderLines[i]; i++) for (i = 0; ppszRawHeaderLines[i]; i++)
{ {
int len = strlenW(ppszRawHeaderLines[i]); DWORD len = strlenW(ppszRawHeaderLines[i]);
memcpy(pszString, ppszRawHeaderLines[i], (len+1)*sizeof(WCHAR)); memcpy(pszString, ppszRawHeaderLines[i], (len+1)*sizeof(WCHAR));
pszString += len+1; pszString += len+1;
} }
...@@ -971,7 +970,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel, ...@@ -971,7 +970,7 @@ BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLevel,
} }
else else
{ {
INT len = (strlenW(lphttpHdr->lpszValue) + 1) * sizeof(WCHAR); DWORD len = (strlenW(lphttpHdr->lpszValue) + 1) * sizeof(WCHAR);
if (len > *lpdwBufferLength) if (len > *lpdwBufferLength)
{ {
...@@ -1087,7 +1086,7 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, ...@@ -1087,7 +1086,7 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel,
#undef FE #undef FE
DWORD info_mod = dwInfoLevel & HTTP_QUERY_MODIFIER_FLAGS_MASK; DWORD info_mod = dwInfoLevel & HTTP_QUERY_MODIFIER_FLAGS_MASK;
DWORD info = dwInfoLevel & HTTP_QUERY_HEADER_MASK; DWORD info = dwInfoLevel & HTTP_QUERY_HEADER_MASK;
int i; DWORD i;
TRACE("(%p, 0x%08lx)--> %ld\n", hHttpRequest, dwInfoLevel, dwInfoLevel); TRACE("(%p, 0x%08lx)--> %ld\n", hHttpRequest, dwInfoLevel, dwInfoLevel);
TRACE(" Attribute:"); TRACE(" Attribute:");
...@@ -1456,7 +1455,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -1456,7 +1455,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength) DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength)
{ {
INT cnt; INT cnt;
INT i; DWORD i;
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE;
LPWSTR requestString = NULL; LPWSTR requestString = NULL;
INT responseLen; INT responseLen;
...@@ -1514,7 +1513,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, ...@@ -1514,7 +1513,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
static const WCHAR szColon[] = { ':',' ',0 }; static const WCHAR szColon[] = { ':',' ',0 };
LPCWSTR *req; LPCWSTR *req;
LPWSTR p, szCookedHeaders = NULL; LPWSTR p, szCookedHeaders = NULL;
int len, n; DWORD len, n;
char *ascii_req; char *ascii_req;
TRACE("Going to url %s %s\n", debugstr_w(lpwhr->lpszHostName), debugstr_w(lpwhr->lpszPath)); TRACE("Going to url %s %s\n", debugstr_w(lpwhr->lpszHostName), debugstr_w(lpwhr->lpszPath));
...@@ -1996,9 +1995,9 @@ BOOL HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr) ...@@ -1996,9 +1995,9 @@ BOOL HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr)
static const WCHAR szCrLf[] = {'\r','\n',0}; static const WCHAR szCrLf[] = {'\r','\n',0};
char bufferA[MAX_REPLY_LEN]; char bufferA[MAX_REPLY_LEN];
LPWSTR status_code, status_text; LPWSTR status_code, status_text;
int cchMaxRawHeaders = 1024; DWORD cchMaxRawHeaders = 1024;
LPWSTR lpszRawHeaders = HeapAlloc(GetProcessHeap(), 0, (cchMaxRawHeaders+1)*sizeof(WCHAR)); LPWSTR lpszRawHeaders = HeapAlloc(GetProcessHeap(), 0, (cchMaxRawHeaders+1)*sizeof(WCHAR));
int cchRawHeaders = 0; DWORD cchRawHeaders = 0;
TRACE("-->\n"); TRACE("-->\n");
...@@ -2298,7 +2297,7 @@ BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR value, D ...@@ -2298,7 +2297,7 @@ BOOL HTTP_ProcessHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field, LPCWSTR value, D
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE;
INT index; INT index;
TRACE("--> %s: %s - 0x%08x\n", debugstr_w(field), debugstr_w(value), (unsigned int)dwModifier); TRACE("--> %s: %s - 0x%08lx\n", debugstr_w(field), debugstr_w(value), dwModifier);
/* Adjust modifier flags */ /* Adjust modifier flags */
if (dwModifier & COALESCEFLASG) if (dwModifier & COALESCEFLASG)
...@@ -2453,7 +2452,7 @@ VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr) ...@@ -2453,7 +2452,7 @@ VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr)
*/ */
static void HTTP_CloseHTTPRequestHandle(LPWININETHANDLEHEADER hdr) static void HTTP_CloseHTTPRequestHandle(LPWININETHANDLEHEADER hdr)
{ {
int i; DWORD i;
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr; LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr;
TRACE("\n"); TRACE("\n");
...@@ -2519,7 +2518,7 @@ void HTTP_CloseHTTPSessionHandle(LPWININETHANDLEHEADER hdr) ...@@ -2519,7 +2518,7 @@ void HTTP_CloseHTTPSessionHandle(LPWININETHANDLEHEADER hdr)
*/ */
INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField) INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField)
{ {
INT index; DWORD index;
TRACE("%s\n", debugstr_w(lpszField)); TRACE("%s\n", debugstr_w(lpszField));
...@@ -2533,7 +2532,7 @@ INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField) ...@@ -2533,7 +2532,7 @@ INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField)
if (index >= lpwhr->nCustHeaders) if (index >= lpwhr->nCustHeaders)
index = -1; index = -1;
TRACE("Return: %d\n", index); TRACE("Return: %lu\n", index);
return index; return index;
} }
...@@ -2582,7 +2581,7 @@ BOOL HTTP_InsertCustomHeader(LPWININETHTTPREQW lpwhr, LPHTTPHEADERW lpHdr) ...@@ -2582,7 +2581,7 @@ BOOL HTTP_InsertCustomHeader(LPWININETHTTPREQW lpwhr, LPHTTPHEADERW lpHdr)
* Delete header from array * Delete header from array
* If this function is called, the indexs may change. * If this function is called, the indexs may change.
*/ */
BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, INT index) BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, DWORD index)
{ {
if( lpwhr->nCustHeaders <= 0 ) if( lpwhr->nCustHeaders <= 0 )
return FALSE; return FALSE;
......
...@@ -451,7 +451,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, ...@@ -451,7 +451,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType,
FE(INTERNET_FLAG_OFFLINE) FE(INTERNET_FLAG_OFFLINE)
}; };
#undef FE #undef FE
int i; DWORD i;
const char *access_type_str = "Unknown"; const char *access_type_str = "Unknown";
DWORD flag_val = dwFlags; DWORD flag_val = dwFlags;
...@@ -873,7 +873,7 @@ BOOL WINAPI INTERNET_FindNextFileW(LPWININETFINDNEXTW lpwh, LPVOID lpvFindData) ...@@ -873,7 +873,7 @@ BOOL WINAPI INTERNET_FindNextFileW(LPWININETFINDNEXTW lpwh, LPVOID lpvFindData)
return FALSE; return FALSE;
} }
TRACE("index(%d) size(%ld)\n", lpwh->index, lpwh->size); TRACE("index(%ld) size(%ld)\n", lpwh->index, lpwh->size);
lpFindFileData = (LPWIN32_FIND_DATAW) lpvFindData; lpFindFileData = (LPWIN32_FIND_DATAW) lpvFindData;
ZeroMemory(lpFindFileData, sizeof(WIN32_FIND_DATAA)); ZeroMemory(lpFindFileData, sizeof(WIN32_FIND_DATAA));
...@@ -999,7 +999,7 @@ void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen, ...@@ -999,7 +999,7 @@ void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen,
{ {
if (*dwComponentLen != 0) if (*dwComponentLen != 0)
{ {
int nASCIILength=WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,NULL,0,NULL,NULL); DWORD nASCIILength=WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,NULL,0,NULL,NULL);
if (*lppszComponent == NULL) if (*lppszComponent == NULL)
{ {
int nASCIIOffset=WideCharToMultiByte(CP_ACP,0,lpwszStart,lpwszComponent-lpwszStart,NULL,0,NULL,NULL); int nASCIIOffset=WideCharToMultiByte(CP_ACP,0,lpwszStart,lpwszComponent-lpwszStart,NULL,0,NULL,NULL);
...@@ -1008,7 +1008,7 @@ void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen, ...@@ -1008,7 +1008,7 @@ void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen,
} }
else else
{ {
INT ncpylen = min((*dwComponentLen)-1, nASCIILength); DWORD ncpylen = min((*dwComponentLen)-1, nASCIILength);
WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,*lppszComponent,ncpylen+1,NULL,NULL); WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,*lppszComponent,ncpylen+1,NULL,NULL);
(*lppszComponent)[ncpylen]=0; (*lppszComponent)[ncpylen]=0;
*dwComponentLen = ncpylen; *dwComponentLen = ncpylen;
...@@ -1101,7 +1101,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, ...@@ -1101,7 +1101,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
* INTERNET_SCHEME_UNKNOWN on failure * INTERNET_SCHEME_UNKNOWN on failure
* *
*/ */
INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, INT nMaxCmp) static INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, DWORD nMaxCmp)
{ {
INTERNET_SCHEME iScheme=INTERNET_SCHEME_UNKNOWN; INTERNET_SCHEME iScheme=INTERNET_SCHEME_UNKNOWN;
static const WCHAR lpszFtp[]={'f','t','p',0}; static const WCHAR lpszFtp[]={'f','t','p',0};
...@@ -1151,9 +1151,9 @@ INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, INT nMaxCmp) ...@@ -1151,9 +1151,9 @@ INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, INT nMaxCmp)
* FALSE on failure * FALSE on failure
* *
*/ */
BOOL SetUrlComponentValueW(LPWSTR* lppszComponent, LPDWORD dwComponentLen, LPCWSTR lpszStart, INT len) static BOOL SetUrlComponentValueW(LPWSTR* lppszComponent, LPDWORD dwComponentLen, LPCWSTR lpszStart, DWORD len)
{ {
TRACE("%s (%d)\n", debugstr_wn(lpszStart,len), len); TRACE("%s (%ld)\n", debugstr_wn(lpszStart,len), len);
if ( (*dwComponentLen == 0) && (*lppszComponent == NULL) ) if ( (*dwComponentLen == 0) && (*lppszComponent == NULL) )
return FALSE; return FALSE;
...@@ -1167,7 +1167,7 @@ BOOL SetUrlComponentValueW(LPWSTR* lppszComponent, LPDWORD dwComponentLen, LPCWS ...@@ -1167,7 +1167,7 @@ BOOL SetUrlComponentValueW(LPWSTR* lppszComponent, LPDWORD dwComponentLen, LPCWS
} }
else else
{ {
INT ncpylen = min((*dwComponentLen)-1, len); DWORD ncpylen = min((*dwComponentLen)-1, len);
strncpyW(*lppszComponent, lpszStart, ncpylen); strncpyW(*lppszComponent, lpszStart, ncpylen);
(*lppszComponent)[ncpylen] = '\0'; (*lppszComponent)[ncpylen] = '\0';
*dwComponentLen = ncpylen; *dwComponentLen = ncpylen;
......
...@@ -184,7 +184,7 @@ typedef struct ...@@ -184,7 +184,7 @@ typedef struct
WININET_NETCONNECTION netConnection; WININET_NETCONNECTION netConnection;
HTTPHEADERW StdHeaders[HTTP_QUERY_MAX+1]; HTTPHEADERW StdHeaders[HTTP_QUERY_MAX+1];
HTTPHEADERW *pCustHeaders; HTTPHEADERW *pCustHeaders;
INT nCustHeaders; DWORD nCustHeaders;
} WININETHTTPREQW, *LPWININETHTTPREQW; } WININETHTTPREQW, *LPWININETHTTPREQW;
...@@ -224,7 +224,7 @@ typedef struct ...@@ -224,7 +224,7 @@ typedef struct
typedef struct typedef struct
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
int index; DWORD index;
DWORD size; DWORD size;
LPFILEPROPERTIESW lpafp; LPFILEPROPERTIESW lpafp;
} WININETFINDNEXTW, *LPWININETFINDNEXTW; } WININETFINDNEXTW, *LPWININETFINDNEXTW;
......
...@@ -413,7 +413,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD ...@@ -413,7 +413,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
struct timeval tv; struct timeval tv;
fd_set infd; fd_set infd;
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE;
INT nRecv = 0; DWORD nRecv = 0;
FD_ZERO(&infd); FD_ZERO(&infd);
FD_SET(connection->socketFD, &infd); FD_SET(connection->socketFD, &infd);
...@@ -450,7 +450,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD ...@@ -450,7 +450,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{ {
lpszBuffer[nRecv++] = '\0'; lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv; *dwBuffer = nRecv;
TRACE(":%d %s\n", nRecv, lpszBuffer); TRACE(":%lu %s\n", nRecv, lpszBuffer);
return TRUE; return TRUE;
} }
else else
...@@ -462,7 +462,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD ...@@ -462,7 +462,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{ {
#ifdef HAVE_OPENSSL_SSL_H #ifdef HAVE_OPENSSL_SSL_H
long prev_timeout; long prev_timeout;
INT nRecv = 0; DWORD nRecv = 0;
BOOL success = TRUE; BOOL success = TRUE;
prev_timeout = pSSL_CTX_get_timeout(ctx); prev_timeout = pSSL_CTX_get_timeout(ctx);
...@@ -491,7 +491,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD ...@@ -491,7 +491,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{ {
lpszBuffer[nRecv++] = '\0'; lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv; *dwBuffer = nRecv;
TRACE("_SSL:%d %s\n", nRecv, lpszBuffer); TRACE("_SSL:%lu %s\n", nRecv, lpszBuffer);
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
......
...@@ -345,7 +345,7 @@ void URLCacheContainers_CreateDefaults() ...@@ -345,7 +345,7 @@ void URLCacheContainers_CreateDefaults()
{ CSIDL_HISTORY, HistorySuffix, HistoryPrefix }, { CSIDL_HISTORY, HistorySuffix, HistoryPrefix },
{ CSIDL_COOKIES, CookieSuffix, CookiePrefix }, { CSIDL_COOKIES, CookieSuffix, CookiePrefix },
}; };
int i; DWORD i;
for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++)
{ {
...@@ -355,7 +355,7 @@ void URLCacheContainers_CreateDefaults() ...@@ -355,7 +355,7 @@ void URLCacheContainers_CreateDefaults()
if (FAILED(SHGetSpecialFolderPathW(NULL, wszCachePath, DefaultContainerData[i].nFolder, TRUE))) if (FAILED(SHGetSpecialFolderPathW(NULL, wszCachePath, DefaultContainerData[i].nFolder, TRUE)))
{ {
ERR("Couldn't get path for default container %d\n", i); ERR("Couldn't get path for default container %lu\n", i);
continue; continue;
} }
path_len = strlenW(wszCachePath); path_len = strlenW(wszCachePath);
...@@ -878,7 +878,7 @@ static DWORD URLCache_HashKey(LPCSTR lpszKey) ...@@ -878,7 +878,7 @@ static DWORD URLCache_HashKey(LPCSTR lpszKey)
0x98, 0x83, 0x7B, 0xE5, 0xCB, 0x4C, 0x78, 0xD1 0x98, 0x83, 0x7B, 0xE5, 0xCB, 0x4C, 0x78, 0xD1
}; };
BYTE key[4]; BYTE key[4];
int i; DWORD i;
int subscript[sizeof(key) / sizeof(key[0])]; int subscript[sizeof(key) / sizeof(key[0])];
subscript[0] = *lpszKey; subscript[0] = *lpszKey;
...@@ -1732,7 +1732,7 @@ BOOL WINAPI CommitUrlCacheEntryA( ...@@ -1732,7 +1732,7 @@ BOOL WINAPI CommitUrlCacheEntryA(
/* Get file size */ /* Get file size */
dwFileSizeLow = GetFileSize(hFile, &dwFileSizeHigh); dwFileSizeLow = GetFileSize(hFile, &dwFileSizeHigh);
if ((dwFileSizeLow == -1) && (GetLastError() != NO_ERROR)) if ((dwFileSizeLow == INVALID_FILE_SIZE) && (GetLastError() != NO_ERROR))
{ {
ERR("couldn't get file size (error is %ld)\n", GetLastError()); ERR("couldn't get file size (error is %ld)\n", GetLastError());
CloseHandle(hFile); CloseHandle(hFile);
...@@ -1904,7 +1904,7 @@ BOOL WINAPI ReadUrlCacheEntryStream( ...@@ -1904,7 +1904,7 @@ BOOL WINAPI ReadUrlCacheEntryStream(
return FALSE; return FALSE;
} }
if (SetFilePointer(pStream->hFile, dwLocation, NULL, FILE_CURRENT) == -1) if (SetFilePointer(pStream->hFile, dwLocation, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER)
return FALSE; return FALSE;
return ReadFile(pStream->hFile, lpBuffer, *lpdwLen, lpdwLen, NULL); return ReadFile(pStream->hFile, lpBuffer, *lpdwLen, lpdwLen, NULL);
} }
......
...@@ -207,7 +207,7 @@ static const char *get_callback_name(DWORD dwInternetStatus) { ...@@ -207,7 +207,7 @@ static const char *get_callback_name(DWORD dwInternetStatus) {
FE(INTERNET_STATE_BUSY) FE(INTERNET_STATE_BUSY)
#undef FE #undef FE
}; };
int i; DWORD i;
for (i = 0; i < (sizeof(internet_status) / sizeof(internet_status[0])); i++) { for (i = 0; i < (sizeof(internet_status) / sizeof(internet_status[0])); i++) {
if (internet_status[i].val == dwInternetStatus) return internet_status[i].name; if (internet_status[i].val == dwInternetStatus) return internet_status[i].name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment