kernel32: Fix some compiler warnings.

This commit is contained in:
Dmitry Timoshkov 2007-09-04 16:57:55 +09:00 committed by Alexandre Julliard
parent 572e803654
commit 0aec2623c5
1 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ static NTSTATUS get_res_nameA( LPCSTR name, UNICODE_STRING *str )
{
if (!HIWORD(name))
{
str->Buffer = (LPWSTR)name;
str->Buffer = ULongToPtr(LOWORD(name));
return STATUS_SUCCESS;
}
if (name[0] == '#')
@ -73,7 +73,7 @@ static NTSTATUS get_res_nameW( LPCWSTR name, UNICODE_STRING *str )
{
if (!HIWORD(name))
{
str->Buffer = (LPWSTR)name;
str->Buffer = ULongToPtr(LOWORD(name));
return STATUS_SUCCESS;
}
if (name[0] == '#')
@ -103,7 +103,7 @@ static BOOL get_res_name_type_WtoA( LPCWSTR name, LPCWSTR type, LPSTR *nameA, LP
*nameA = HeapAlloc( GetProcessHeap(), 0, len );
if (*nameA) WideCharToMultiByte( CP_ACP, 0, name, -1, *nameA, len, NULL, NULL );
}
else *nameA = (LPSTR)name;
else *nameA = ULongToPtr(LOWORD(name));
if (HIWORD(type))
{
@ -111,7 +111,7 @@ static BOOL get_res_name_type_WtoA( LPCWSTR name, LPCWSTR type, LPSTR *nameA, LP
*typeA = HeapAlloc( GetProcessHeap(), 0, len );
if (*typeA) WideCharToMultiByte( CP_ACP, 0, type, -1, *typeA, len, NULL, NULL );
}
else *typeA = (LPSTR)type;
else *typeA = ULongToPtr(LOWORD(type));
}
__EXCEPT_PAGE_FAULT
{
@ -1684,11 +1684,11 @@ BOOL WINAPI UpdateResourceA( HANDLE hUpdate, LPCSTR lpType, LPCSTR lpName,
UNICODE_STRING TypeW;
UNICODE_STRING NameW;
if(!HIWORD(lpType))
TypeW.Buffer = (LPWSTR)lpType;
TypeW.Buffer = ULongToPtr(LOWORD(lpType));
else
RtlCreateUnicodeStringFromAsciiz(&TypeW, lpType);
if(!HIWORD(lpName))
NameW.Buffer = (LPWSTR)lpName;
NameW.Buffer = ULongToPtr(LOWORD(lpName));
else
RtlCreateUnicodeStringFromAsciiz(&NameW, lpName);
ret = UpdateResourceW(hUpdate, TypeW.Buffer, NameW.Buffer, wLanguage, lpData, cbData);