Andrew Talbot : msi: Cast-qual warnings fix.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 20 13:26:55 CDT 2006
Module: wine
Branch: master
Commit: 2e372c08b52f564eacab3558754f9413e80be6a9
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2e372c08b52f564eacab3558754f9413e80be6a9
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Sun Sep 17 08:52:49 2006 +0100
msi: Cast-qual warnings fix.
---
dlls/msi/action.c | 9 +++++----
dlls/msi/appsearch.c | 2 +-
dlls/msi/registry.c | 4 ++--
dlls/msi/source.c | 8 ++++----
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index f5d92e3..a1b7155 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -364,6 +364,7 @@ static UINT msi_parse_command_line( MSIP
static LPWSTR* msi_split_string( LPCWSTR str, WCHAR sep )
{
+ LPCWSTR pc;
LPWSTR p, *ret = NULL;
UINT count = 0;
@@ -371,11 +372,11 @@ static LPWSTR* msi_split_string( LPCWSTR
return ret;
/* count the number of substrings */
- for ( p = (LPWSTR)str, count = 0; p; count++ )
+ for ( pc = str, count = 0; pc; count++ )
{
- p = strchrW( p, sep );
- if (p)
- p++;
+ pc = strchrW( pc, sep );
+ if (pc)
+ pc++;
}
/* allocate space for an array of substring pointers and the substrings */
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index b47ecec..9e65d6d 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -254,7 +254,7 @@ static void ACTION_ConvertRegValue(DWORD
switch (regType)
{
case REG_SZ:
- if (*(LPWSTR)value == '#')
+ if (*(LPCWSTR)value == '#')
{
/* escape leading pound with another */
*appValue = msi_alloc(sz + sizeof(WCHAR));
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index ddeb3a6..e31e343 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -334,7 +334,7 @@ LPWSTR msi_version_dword_to_str(DWORD ve
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 @@ LONG msi_reg_set_val_multi_str( HKEY hke
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 --git a/dlls/msi/source.c b/dlls/msi/source.c
index 7499429..388bd28 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -333,7 +333,7 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWS
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 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWS
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 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWS
{
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 @@ UINT WINAPI MsiSourceListAddSourceExW( L
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-cvs
mailing list