Michael Stefaniuc : mlang: Silence some Win64 compile warnings.

Alexandre Julliard julliard at winehq.org
Wed Mar 4 09:00:50 CST 2009


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Tue Mar  3 23:56:31 2009 +0100

mlang: Silence some Win64 compile warnings.

If the flag TCI_SRCFONTSIG is not set then the first argument passed
to TranslateCharsetInfo is just a DWORD that needs to be marshalled
over a pointer.

---

 dlls/mlang/mlang.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index f9c3f8e..6f79f0b 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -1954,7 +1954,7 @@ static HRESULT WINAPI fnIMLangFontLink_CodePageToCodePages(
 
     TRACE("(%p) Seeking %u\n",This, uCodePage);
 
-    rc = TranslateCharsetInfo((DWORD*)uCodePage, &cs, TCI_SRCCODEPAGE);
+    rc = TranslateCharsetInfo((DWORD*)(DWORD_PTR)uCodePage, &cs, TCI_SRCCODEPAGE);
 
     if (rc)
     {
@@ -1985,8 +1985,9 @@ static HRESULT WINAPI fnIMLangFontLink_CodePagesToCodePage(
 
     *puCodePage = 0x00000000;
 
-    rc = TranslateCharsetInfo((DWORD*)uDefaultCodePage, &cs, TCI_SRCCODEPAGE);
-  
+    rc = TranslateCharsetInfo((DWORD*)(DWORD_PTR)uDefaultCodePage, &cs,
+                              TCI_SRCCODEPAGE);
+
     if (rc && (dwCodePages & cs.fs.fsCsb[0]))
     {
         TRACE("Found Default Codepage\n");
@@ -2592,7 +2593,8 @@ static void fill_cp_info(const struct mlang_data *ml_data, UINT index, MIMECPINF
 {
     CHARSETINFO csi;
 
-    if (TranslateCharsetInfo((DWORD *)ml_data->family_codepage, &csi, TCI_SRCCODEPAGE))
+    if (TranslateCharsetInfo((DWORD*)(DWORD_PTR)ml_data->family_codepage, &csi,
+                             TCI_SRCCODEPAGE))
         mime_cp_info->bGDICharset = csi.ciCharset;
     else
         mime_cp_info->bGDICharset = DEFAULT_CHARSET;




More information about the wine-cvs mailing list