Andrew Talbot : gdi32: Cast-qual warnings fix.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 31 05:43:08 CST 2006
Module: wine
Branch: master
Commit: 17ec5aba207e075dc54db23fa344f408dfa08436
URL: http://source.winehq.org/git/wine.git/?a=commit;h=17ec5aba207e075dc54db23fa344f408dfa08436
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Mon Oct 30 21:06:56 2006 +0000
gdi32: Cast-qual warnings fix.
---
dlls/gdi32/metafile.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/dlls/gdi32/metafile.c b/dlls/gdi32/metafile.c
index 68a9b16..88a01d1 100644
--- a/dlls/gdi32/metafile.c
+++ b/dlls/gdi32/metafile.c
@@ -1069,27 +1069,28 @@ #undef META_UNIMP
*/
HMETAFILE WINAPI SetMetaFileBitsEx( UINT size, const BYTE *lpData )
{
- METAHEADER *mh = (METAHEADER *)lpData;
+ const METAHEADER *mh_in = (const METAHEADER *)lpData;
+ METAHEADER *mh_out;
if (size & 1) return 0;
- if (!size || mh->mtType != METAFILE_MEMORY || mh->mtVersion != MFVERSION ||
- mh->mtHeaderSize != sizeof(METAHEADER) / 2)
+ if (!size || mh_in->mtType != METAFILE_MEMORY || mh_in->mtVersion != MFVERSION ||
+ mh_in->mtHeaderSize != sizeof(METAHEADER) / 2)
{
SetLastError(ERROR_INVALID_DATA);
return 0;
}
- mh = HeapAlloc( GetProcessHeap(), 0, size );
- if (!mh)
+ mh_out = HeapAlloc( GetProcessHeap(), 0, size );
+ if (!mh_out)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
- memcpy(mh, lpData, size);
- mh->mtSize = size / 2;
- return MF_Create_HMETAFILE(mh);
+ memcpy(mh_out, mh_in, size);
+ mh_out->mtSize = size / 2;
+ return MF_Create_HMETAFILE(mh_out);
}
/*****************************************************************
More information about the wine-cvs
mailing list