Andrew Talbot : winex11.drv: Cast-qual warnings fix.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 27 12:50:57 CST 2006
Module: wine
Branch: master
Commit: 3be7b8b64c91fc0bc5a4f73aa21fe3f6c5dd438f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3be7b8b64c91fc0bc5a4f73aa21fe3f6c5dd438f
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Sat Nov 25 18:23:55 2006 +0000
winex11.drv: Cast-qual warnings fix.
---
dlls/winex11.drv/clipboard.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index c9fde2c..b63fd05 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -511,7 +511,8 @@ static WINE_CLIPFORMAT *X11DRV_CLIPBOARD
{
LPWINE_CLIPFORMAT lpFormat;
LPWINE_CLIPFORMAT lpNewFormat;
-
+ LPWSTR new_name;
+
/* allocate storage for new format entry */
lpNewFormat = HeapAlloc(GetProcessHeap(), 0, sizeof(WINE_CLIPFORMAT));
@@ -521,14 +522,14 @@ static WINE_CLIPFORMAT *X11DRV_CLIPBOARD
return NULL;
}
- if (!(lpNewFormat->Name = HeapAlloc(GetProcessHeap(), 0, (strlenW(FormatName)+1)*sizeof(WCHAR))))
+ if (!(new_name = HeapAlloc(GetProcessHeap(), 0, (strlenW(FormatName)+1)*sizeof(WCHAR))))
{
WARN("No more memory for the new format name!\n");
HeapFree(GetProcessHeap(), 0, lpNewFormat);
return NULL;
}
- strcpyW((LPWSTR)lpNewFormat->Name, FormatName);
+ lpNewFormat->Name = strcpyW(new_name, FormatName);
lpNewFormat->wFlags = 0;
lpNewFormat->wFormatID = GlobalAddAtomW(lpNewFormat->Name);
lpNewFormat->drvData = prop;
More information about the wine-cvs
mailing list