msi: Cast-qual warnings fix
Andrew Talbot
Andrew.Talbot at talbotville.com
Sat Sep 16 18:13:29 CDT 2006
Changelog:
msi: Cast-qual warnings fix.
diff -urN a/dlls/msi/action.c b/dlls/msi/action.c
--- a/dlls/msi/action.c 2006-09-13 19:22:41.000000000 +0100
+++ b/dlls/msi/action.c 2006-09-16 23:49:56.000000000 +0100
@@ -364,6 +364,7 @@
static LPWSTR* msi_split_string( LPCWSTR str, WCHAR sep )
{
+ LPCWSTR cp;
LPWSTR p, *ret = NULL;
UINT count = 0;
@@ -371,11 +372,11 @@
return ret;
/* count the number of substrings */
- for ( p = (LPWSTR)str, count = 0; p; count++ )
+ for ( cp = str, count = 0; cp; count++ )
{
- p = strchrW( p, sep );
- if (p)
- p++;
+ cp = strchrW( cp, sep );
+ if (cp)
+ cp++;
}
/* allocate space for an array of substring pointers and the substrings */
diff -urN a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
--- a/dlls/msi/appsearch.c 2006-07-27 11:43:14.000000000 +0100
+++ b/dlls/msi/appsearch.c 2006-09-16 23:50:06.000000000 +0100
@@ -254,7 +254,7 @@
switch (regType)
{
case REG_SZ:
- if (*(LPWSTR)value == '#')
+ if (*(LPCWSTR)value == '#')
{
/* escape leading pound with another */
*appValue = msi_alloc(sz + sizeof(WCHAR));
diff -urN a/dlls/msi/registry.c b/dlls/msi/registry.c
--- a/dlls/msi/registry.c 2006-07-28 13:16:35.000000000 +0100
+++ b/dlls/msi/registry.c 2006-09-16 23:50:15.000000000 +0100
@@ -334,7 +334,7 @@
LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value )
{
DWORD len = value ? (lstrlenW(value) + 1) * sizeof (WCHAR) : 0;
- return RegSetValueExW( hkey, name, 0, REG_SZ, (LPBYTE)value, len );
+ return RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)value, len );
}
LONG msi_reg_set_val_multi_str( HKEY hkey, LPCWSTR name, LPCWSTR value )
@@ -342,7 +342,7 @@
LPCWSTR p = value;
while (*p) p += lstrlenW(p) + 1;
return RegSetValueExW( hkey, name, 0, REG_MULTI_SZ,
- (LPBYTE)value, (p + 1 - value) * sizeof(WCHAR) );
+ (const BYTE *)value, (p + 1 - value) * sizeof(WCHAR) );
}
LONG msi_reg_set_val_dword( HKEY hkey, LPCWSTR name, DWORD val )
diff -urN a/dlls/msi/source.c b/dlls/msi/source.c
--- a/dlls/msi/source.c 2006-08-16 12:17:13.000000000 +0100
+++ b/dlls/msi/source.c 2006-09-16 23:50:24.000000000 +0100
@@ -333,7 +333,7 @@
rc = OpenMediaSubkey(sourcekey, &key, FALSE);
if (rc == ERROR_SUCCESS)
rc = RegSetValueExW(key, INSTALLPROPERTY_MEDIAPACKAGEPATHW, 0,
- REG_SZ, (LPBYTE)szValue, size);
+ REG_SZ, (const BYTE *)szValue, size);
if (rc != ERROR_SUCCESS)
rc = ERROR_UNKNOWN_PROPERTY;
RegCloseKey(key);
@@ -345,7 +345,7 @@
rc = OpenMediaSubkey(sourcekey, &key, FALSE);
if (rc == ERROR_SUCCESS)
rc = RegSetValueExW(key, INSTALLPROPERTY_DISKPROMPTW, 0,
- REG_SZ, (LPBYTE)szValue, size);
+ REG_SZ, (const BYTE *)szValue, size);
if (rc != ERROR_SUCCESS)
rc = ERROR_UNKNOWN_PROPERTY;
RegCloseKey(key);
@@ -383,7 +383,7 @@
{
DWORD size = lstrlenW(szValue)*sizeof(WCHAR);
rc = RegSetValueExW(sourcekey, INSTALLPROPERTY_PACKAGENAMEW, 0,
- REG_SZ, (LPBYTE)szValue, size);
+ REG_SZ, (const BYTE *)szValue, size);
if (rc != ERROR_SUCCESS)
rc = ERROR_UNKNOWN_PROPERTY;
}
@@ -532,7 +532,7 @@
current_index ++;
sprintfW(source_struct.szIndex,fmt,current_index);
rc = RegSetValueExW(typekey, source_struct.szIndex, 0, REG_EXPAND_SZ,
- (LPBYTE)szSource, size);
+ (const BYTE *)szSource, size);
}
RegCloseKey(typekey);
More information about the wine-patches
mailing list