Andrew Talbot : user32: Cast-qual warnings fix.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 20 05:52:08 CST 2006
Module: wine
Branch: master
Commit: bc95bfd3c1466db5592951bde866450c3c712646
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc95bfd3c1466db5592951bde866450c3c712646
Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date: Sat Nov 18 14:22:13 2006 +0000
user32: Cast-qual warnings fix.
---
dlls/user32/edit.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 76f3e04..f93c9aa 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -5014,11 +5014,12 @@ static void EDIT_WM_SetFont(EDITSTATE *e
*/
static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode)
{
+ LPWSTR textW = NULL;
if (!unicode && text)
{
LPCSTR textA = (LPCSTR)text;
INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
- LPWSTR textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR));
+ textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR));
if (textW)
MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
text = textW;
@@ -5035,7 +5036,7 @@ static void EDIT_WM_SetText(EDITSTATE *e
TRACE("%s\n", debugstr_w(text));
EDIT_EM_ReplaceSel(es, FALSE, text, FALSE, FALSE);
if(!unicode)
- HeapFree(GetProcessHeap(), 0, (LPWSTR)text);
+ HeapFree(GetProcessHeap(), 0, textW);
}
else
{
More information about the wine-cvs
mailing list