Alexandre Julliard : ole32: Fix some pointer conversion warnings on 64-bit.

Alexandre Julliard julliard at winehq.org
Thu May 28 09:39:45 CDT 2009


Module: wine
Branch: master
Commit: fb640601eaccbe81814488ff02403878264e7b84
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fb640601eaccbe81814488ff02403878264e7b84

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 28 15:24:25 2009 +0200

ole32: Fix some pointer conversion warnings on 64-bit.

---

 dlls/ole32/tests/clipboard.c  |    2 +-
 dlls/ole32/tests/usrmarshal.c |    2 +-
 dlls/ole32/usrmarshal.c       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index f06a482..a6229a1 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -735,7 +735,7 @@ static void test_cf_dataobject(IDataObject *data)
                             DVTARGETDEVICE *target;
 
                             ok(fmt_ptr->fmt.ptd != NULL, "target device offset zero\n");
-                            target = (DVTARGETDEVICE*)((char*)priv + (DWORD)fmt_ptr->fmt.ptd);
+                            target = (DVTARGETDEVICE*)((char*)priv + (DWORD_PTR)fmt_ptr->fmt.ptd);
                             ok(!memcmp(target, fmt.ptd, fmt.ptd->tdSize), "target devices differ\n");
                             CoTaskMemFree(fmt.ptd);
                         }
diff --git a/dlls/ole32/tests/usrmarshal.c b/dlls/ole32/tests/usrmarshal.c
index 2b7103c..fde0034 100644
--- a/dlls/ole32/tests/usrmarshal.c
+++ b/dlls/ole32/tests/usrmarshal.c
@@ -145,7 +145,7 @@ static void test_marshal_HWND(void)
     HWND_UserMarshal(&umcb.Flags, buffer, &hwnd);
     wirehwnd = (wireHWND)buffer;
     ok(wirehwnd->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", wirehwnd->fContext);
-    ok(wirehwnd->u.hInproc == (LONG_PTR)hwnd, "Marshaled value should be %p instead of %p\n", hwnd, (HANDLE)wirehwnd->u.hRemote);
+    ok(wirehwnd->u.hInproc == (LONG_PTR)hwnd, "Marshaled value should be %p instead of %x\n", hwnd, wirehwnd->u.hRemote);
 
     init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL);
     HWND_UserUnmarshal(&umcb.Flags, buffer, &hwnd2);
diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index 46fba8b..f180f42 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -307,7 +307,7 @@ static unsigned char * handle_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffe
     RemotableHandle *remhandle = (RemotableHandle *)pBuffer;
     if (remhandle->fContext != WDT_INPROC_CALL)
         RaiseException(RPC_X_BAD_STUB_DATA, 0, 0, NULL);
-    *handle = (HANDLE)remhandle->u.hInproc;
+    *handle = (HANDLE)(LONG_PTR)remhandle->u.hInproc;
     return pBuffer + sizeof(RemotableHandle);
 }
 




More information about the wine-cvs mailing list