Commit 0aec2623 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32: Fix some compiler warnings.

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