Commit 8af7133d authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

mscms: Cast-qual warnings fix.

parent 3dbac638
...@@ -615,7 +615,7 @@ BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer, ...@@ -615,7 +615,7 @@ BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer,
PROFILEHEADER header; PROFILEHEADER header;
WIN32_FIND_DATAA data; WIN32_FIND_DATAA data;
ENUMTYPEW recordW; ENUMTYPEW recordW;
WCHAR *fileW = NULL; WCHAR *fileW = NULL, *deviceW = NULL;
HANDLE find; HANDLE find;
TRACE( "( %p, %p, %p, %p, %p )\n", machine, record, buffer, size, number ); TRACE( "( %p, %p, %p, %p, %p )\n", machine, record, buffer, size, number );
...@@ -643,8 +643,8 @@ BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer, ...@@ -643,8 +643,8 @@ BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer,
memcpy( &recordW, record, sizeof(ENUMTYPEA) ); memcpy( &recordW, record, sizeof(ENUMTYPEA) );
if (record->pDeviceName) if (record->pDeviceName)
{ {
recordW.pDeviceName = MSCMS_strdupW( record->pDeviceName ); deviceW = MSCMS_strdupW( record->pDeviceName );
if (!recordW.pDeviceName) goto exit; if (!(recordW.pDeviceName = deviceW)) goto exit;
} }
fileW = MSCMS_strdupW( data.cFileName ); fileW = MSCMS_strdupW( data.cFileName );
...@@ -730,7 +730,7 @@ exit: ...@@ -730,7 +730,7 @@ exit:
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
HeapFree( GetProcessHeap(), 0, profiles[i] ); HeapFree( GetProcessHeap(), 0, profiles[i] );
HeapFree( GetProcessHeap(), 0, profiles ); HeapFree( GetProcessHeap(), 0, profiles );
HeapFree( GetProcessHeap(), 0, (WCHAR *)recordW.pDeviceName ); HeapFree( GetProcessHeap(), 0, deviceW );
HeapFree( GetProcessHeap(), 0, fileW ); HeapFree( GetProcessHeap(), 0, fileW );
FindClose( find ); FindClose( find );
......
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