urlmon: Sign-compare warnings fix
Andrew Talbot
andrew.talbot at talbotville.com
Thu Nov 13 16:20:48 CST 2008
Changelog:
urlmon: Sign-compare warnings fix.
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index 47b521c..e0f0085 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -1532,7 +1532,8 @@ static BOOL is_urlmon_protocol(LPCWSTR url)
{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++) {
if(len >= protocol_list[i].len
diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c
index dda1dd0..8b5a229 100644
--- a/dlls/urlmon/file.c
+++ b/dlls/urlmon/file.c
@@ -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,
pOIBindInfo, grfPI, dwReserved);
- if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
+ if(!szUrl || strlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
return E_INVALIDARG;
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index ede6f14..99321ef 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -330,7 +330,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
goto done;
}
- if (lstrlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR)
+ if (strlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR)
|| memcmp(szUrl, wszHttp, sizeof(wszHttp)))
{
hres = MK_E_SYNTAX;
diff --git a/dlls/urlmon/regsvr.c b/dlls/urlmon/regsvr.c
index ece1915..2fabcc0 100644
--- a/dlls/urlmon/regsvr.c
+++ b/dlls/urlmon/regsvr.c
@@ -526,7 +526,7 @@ static HRESULT register_inf(BOOL doregister)
STRTABLEA strtable;
STRENTRYA pse[7];
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};
diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c
index 793a8f0..860c386 100644
--- a/dlls/urlmon/umon.c
+++ b/dlls/urlmon/umon.c
@@ -1273,7 +1273,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW
header, sizeof(header), NULL, NULL))
return E_FAIL;
- if (lstrlenW(cache_path) > dwBufLength)
+ if (strlenW(cache_path) > dwBufLength)
return E_OUTOFMEMORY;
lstrcpyW(szFileName, cache_path);
diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c
index 15944b6..bbf58c7 100644
--- a/dlls/urlmon/urlmon_main.c
+++ b/dlls/urlmon/urlmon_main.c
@@ -210,7 +210,7 @@ static const struct object_creation_info object_creation[] =
static void init_session(BOOL init)
{
- int i;
+ unsigned int i;
for(i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) {
@@ -240,7 +240,7 @@ static void init_session(BOOL init)
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);
@@ -435,7 +435,7 @@ static BOOL text_richtext_filter(const BYTE *b, DWORD size)
static BOOL text_html_filter(const BYTE *b, DWORD size)
{
- int i;
+ DWORD i;
if(size < 5)
return FALSE;
@@ -598,7 +598,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
const BYTE *buf = pBuffer;
DWORD len;
LPCWSTR ret = NULL;
- int i;
+ unsigned int i;
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};
More information about the wine-patches
mailing list