Commit 9959d7e3 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

advapi32: Cast-qual warnings fix.

parent 4c4c583f
......@@ -1819,7 +1819,8 @@ BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *p
}
CRYPT_Free(keyname);
if (RegSetValueExW(hTypeKey, nameW, 0, REG_SZ, (LPBYTE)pszProvName, (strlenW(pszProvName) + 1)*sizeof(WCHAR)))
if (RegSetValueExW(hTypeKey, nameW, 0, REG_SZ, (const BYTE *)pszProvName,
(strlenW(pszProvName) + 1)*sizeof(WCHAR)))
{
RegCloseKey(hTypeKey);
RegCloseKey(hProvKey);
......
......@@ -50,7 +50,7 @@ static void CRYPT_LMhash( unsigned char *dst, const unsigned char *pwd, const in
NTSTATUS WINAPI SystemFunction006( LPCSTR password, LPSTR hash )
{
CRYPT_LMhash( (unsigned char*)hash, (unsigned char*)password, strlen(password) );
CRYPT_LMhash( (unsigned char*)hash, (const unsigned char*)password, strlen(password) );
return STATUS_SUCCESS;
}
......
......@@ -373,7 +373,7 @@ HANDLE WINAPI RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceNam
BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
{
LPCWSTR *wideStrArray;
LPWSTR *wideStrArray;
UNICODE_STRING str;
int i;
BOOL ret;
......@@ -384,17 +384,17 @@ BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD d
if (wNumStrings == 0) return TRUE;
if (!lpStrings) return TRUE;
wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPCWSTR) * wNumStrings);
wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPWSTR) * wNumStrings);
for (i = 0; i < wNumStrings; i++)
{
RtlCreateUnicodeStringFromAsciiz(&str, lpStrings[i]);
wideStrArray[i] = str.Buffer;
}
ret = ReportEventW(hEventLog, wType, wCategory, dwEventID, lpUserSid,
wNumStrings, dwDataSize, wideStrArray, lpRawData);
wNumStrings, dwDataSize, (LPCWSTR *)wideStrArray, lpRawData);
for (i = 0; i < wNumStrings; i++)
{
HeapFree( GetProcessHeap(), 0, (LPSTR)wideStrArray[i] );
HeapFree( GetProcessHeap(), 0, wideStrArray[i] );
}
HeapFree(GetProcessHeap(), 0, wideStrArray);
return ret;
......
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