Andrew Talbot : msi: Sign-compare warnings fix.
Module: wine Branch: master Commit: 1c9886d6e72392cd3853397dac48d1824c2af5a8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c9886d6e72392cd3853397dac... Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Mon Oct 20 22:06:20 2008 +0100 msi: Sign-compare warnings fix. --- dlls/msi/msi.c | 10 +++++----- dlls/msi/msiquery.c | 8 ++++---- dlls/msi/source.c | 8 ++++---- dlls/msi/suminfo.c | 3 +-- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index c233411..7940738 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -827,7 +827,7 @@ static UINT WINAPI MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, { save = *pcchValueBuf; - if (lstrlenW(val) < *pcchValueBuf) + if (strlenW(val) < *pcchValueBuf) r = msi_strcpy_to_awstring(val, szValue, pcchValueBuf); else if (szValue->str.a || szValue->str.w) r = ERROR_MORE_DATA; @@ -973,7 +973,7 @@ static UINT msi_copy_outval(LPWSTR val, LPWSTR out, LPDWORD size) if (out) { - if (lstrlenW(val) >= *size) + if (strlenW(val) >= *size) { r = ERROR_MORE_DATA; if (*size > 0) @@ -1591,7 +1591,7 @@ LANGID WINAPI MsiLoadStringA( MSIHANDLE handle, UINT id, LPSTR lpBuffer, { LPWSTR bufW; LANGID r; - DWORD len; + INT len; bufW = msi_alloc(nBufferMax*sizeof(WCHAR)); r = MsiLoadStringW(handle, id, bufW, nBufferMax, lang); @@ -2135,7 +2135,7 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf, HIWORD(ffi->dwFileVersionLS), LOWORD(ffi->dwFileVersionLS)); if (lpVersionBuf) lstrcpynW(lpVersionBuf, tmp, *pcchVersionBuf); - if (lstrlenW(tmp) >= *pcchVersionBuf) + if (strlenW(tmp) >= *pcchVersionBuf) ret = ERROR_MORE_DATA; *pcchVersionBuf = lstrlenW(tmp); @@ -2155,7 +2155,7 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf, wsprintfW(tmp, szLangFormat, *lang); if (lpLangBuf) lstrcpynW(lpLangBuf, tmp, *pcchLangBuf); - if (lstrlenW(tmp) >= *pcchLangBuf) + if (strlenW(tmp) >= *pcchLangBuf) ret = ERROR_MORE_DATA; *pcchLangBuf = lstrlenW(tmp); diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index 4435cd9..3e7a877 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -633,7 +633,7 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR szColumnNameBuffer, MSIQUERY *query = NULL; static const WCHAR szError[] = { 0 }; MSIDBERROR r = MSIDBERROR_NOERROR; - int len; + DWORD len; FIXME("%ld %p %p - returns empty error string\n", handle, szColumnNameBuffer, pcchBuf ); @@ -645,7 +645,7 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR szColumnNameBuffer, if( !query ) return MSIDBERROR_INVALIDARG; - len = lstrlenW( szError ); + len = strlenW( szError ); if( szColumnNameBuffer ) { if( *pcchBuf > len ) @@ -665,7 +665,7 @@ MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR szColumnNameBuffer, static const CHAR szError[] = { 0 }; MSIQUERY *query = NULL; MSIDBERROR r = MSIDBERROR_NOERROR; - int len; + DWORD len; FIXME("%ld %p %p - returns empty error string\n", handle, szColumnNameBuffer, pcchBuf ); @@ -677,7 +677,7 @@ MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR szColumnNameBuffer, if( !query ) return MSIDBERROR_INVALIDARG; - len = lstrlenA( szError ); + len = strlen( szError ); if( szColumnNameBuffer ) { if( *pcchBuf > len ) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 5a714b1..b074022 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -218,7 +218,7 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, DWORD numvals, size; LONG res; UINT r; - static int index = 0; + static DWORD index = 0; static const WCHAR fmt[] = {'#','%','d',0}; @@ -360,7 +360,7 @@ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUser LPWSTR source = NULL; DWORD len = 0; UINT r = ERROR_INVALID_PARAMETER; - static int index = 0; + static DWORD index = 0; TRACE("(%s, %s, %d, %d, %d, %p, %p)\n", debugstr_a(szProductCodeOrPatch), debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, szSource, pcchSource); @@ -433,7 +433,7 @@ UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUs HKEY subkey = NULL; LONG res; UINT r = ERROR_INVALID_PARAMETER; - static int index = 0; + static DWORD index = 0; static const WCHAR format[] = {'%','d',0}; @@ -654,7 +654,7 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, if (szValue) { - if (lstrlenW(ptr) < *pcchValue) + if (strlenW(ptr) < *pcchValue) lstrcpyW(szValue, ptr); else rc = ERROR_MORE_DATA; diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index 5d73c57..148ba8a 100644 --- a/dlls/msi/suminfo.c +++ b/dlls/msi/suminfo.c @@ -169,8 +169,7 @@ static UINT propvar_changetype(PROPVARIANT *changed, PROPVARIANT *property, VART static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz ) { UINT type; - DWORD i; - int size; + DWORD i, size; PROPERTY_DATA *propdata; PROPVARIANT property, *ptr; PROPVARIANT changed;
participants (1)
-
Alexandre Julliard