Commit c7284efa authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

urlmon: Sign-compare warnings fix.

parent 10fcf628
...@@ -1532,7 +1532,8 @@ static BOOL is_urlmon_protocol(LPCWSTR url) ...@@ -1532,7 +1532,8 @@ static BOOL is_urlmon_protocol(LPCWSTR url)
{wszMk, sizeof(wszMk) /sizeof(WCHAR)} {wszMk, sizeof(wszMk) /sizeof(WCHAR)}
}; };
int i, len = strlenW(url); unsigned int i;
int len = lstrlenW(url);
for(i=0; i < sizeof(protocol_list)/sizeof(protocol_list[0]); i++) { for(i=0; i < sizeof(protocol_list)/sizeof(protocol_list[0]); i++) {
if(len >= protocol_list[i].len if(len >= protocol_list[i].len
......
...@@ -109,7 +109,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl ...@@ -109,7 +109,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink, TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
pOIBindInfo, grfPI, dwReserved); pOIBindInfo, grfPI, dwReserved);
if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR) if(!szUrl || strlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile))) || memcmp(szUrl, wszFile, sizeof(wszFile)))
return E_INVALIDARG; return E_INVALIDARG;
......
...@@ -330,7 +330,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl ...@@ -330,7 +330,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
goto done; goto done;
} }
if (lstrlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR) if (strlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR)
|| memcmp(szUrl, wszHttp, sizeof(wszHttp))) || memcmp(szUrl, wszHttp, sizeof(wszHttp)))
{ {
hres = MK_E_SYNTAX; hres = MK_E_SYNTAX;
......
...@@ -526,7 +526,7 @@ static HRESULT register_inf(BOOL doregister) ...@@ -526,7 +526,7 @@ static HRESULT register_inf(BOOL doregister)
STRTABLEA strtable; STRTABLEA strtable;
STRENTRYA pse[7]; STRENTRYA pse[7];
static CLSID const *clsids[34]; static CLSID const *clsids[34];
int i = 0; unsigned int i = 0;
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
......
...@@ -1273,7 +1273,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW ...@@ -1273,7 +1273,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW
header, sizeof(header), NULL, NULL)) header, sizeof(header), NULL, NULL))
return E_FAIL; return E_FAIL;
if (lstrlenW(cache_path) > dwBufLength) if (strlenW(cache_path) > dwBufLength)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
lstrcpyW(szFileName, cache_path); lstrcpyW(szFileName, cache_path);
......
...@@ -210,7 +210,7 @@ static const struct object_creation_info object_creation[] = ...@@ -210,7 +210,7 @@ static const struct object_creation_info object_creation[] =
static void init_session(BOOL init) static void init_session(BOOL init)
{ {
int i; unsigned int i;
for(i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) { for(i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) {
...@@ -240,7 +240,7 @@ static void init_session(BOOL init) ...@@ -240,7 +240,7 @@ static void init_session(BOOL init)
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{ {
int i; unsigned int i;
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
...@@ -435,7 +435,7 @@ static BOOL text_richtext_filter(const BYTE *b, DWORD size) ...@@ -435,7 +435,7 @@ static BOOL text_richtext_filter(const BYTE *b, DWORD size)
static BOOL text_html_filter(const BYTE *b, DWORD size) static BOOL text_html_filter(const BYTE *b, DWORD size)
{ {
int i; DWORD i;
if(size < 5) if(size < 5)
return FALSE; return FALSE;
...@@ -598,7 +598,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer, ...@@ -598,7 +598,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
const BYTE *buf = pBuffer; const BYTE *buf = pBuffer;
DWORD len; DWORD len;
LPCWSTR ret = NULL; LPCWSTR ret = NULL;
int i; unsigned int i;
static const WCHAR wszTextHtml[] = {'t','e','x','t','/','h','t','m','l',0}; static const WCHAR wszTextHtml[] = {'t','e','x','t','/','h','t','m','l',0};
static const WCHAR wszTextRichtext[] = {'t','e','x','t','/','r','i','c','h','t','e','x','t',0}; static const WCHAR wszTextRichtext[] = {'t','e','x','t','/','r','i','c','h','t','e','x','t',0};
......
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