Commit 2e372c08 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

msi: Cast-qual warnings fix.

parent 752600b3
......@@ -364,6 +364,7 @@ static UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine )
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 str, WCHAR sep )
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 */
......
......@@ -254,7 +254,7 @@ static void ACTION_ConvertRegValue(DWORD regType, const BYTE *value, DWORD sz,
switch (regType)
{
case REG_SZ:
if (*(LPWSTR)value == '#')
if (*(LPCWSTR)value == '#')
{
/* escape leading pound with another */
*appValue = msi_alloc(sz + sizeof(WCHAR));
......
......@@ -334,7 +334,7 @@ LPWSTR msi_version_dword_to_str(DWORD version)
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 hkey, LPCWSTR name, LPCWSTR value )
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 )
......
......@@ -333,7 +333,7 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
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( LPCWSTR szProduct, LPCWSTR szUserSid,
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( LPCWSTR szProduct, LPCWSTR szUserSid,
{
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( LPCWSTR szProduct, LPCWSTR szUserSid,
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);
......
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