Ge van Geldorp : gdi: Use variables of correct size.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 21 04:14:30 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 1e554e870b89a1c87f6af58e78ee07d443279f61
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=1e554e870b89a1c87f6af58e78ee07d443279f61

Author: Ge van Geldorp <ge at gse.nl>
Date:   Wed Jul 19 09:17:49 2006 +0200

gdi: Use variables of correct size.

---

 dlls/gdi/freetype.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c
index 7fb62bd..2a6024c 100644
--- a/dlls/gdi/freetype.c
+++ b/dlls/gdi/freetype.c
@@ -814,7 +814,7 @@ #ifdef HAVE_FREETYPE_FTWINFNT_H
                 CHARSETINFO csi;
                 TRACE("pix_h %d charset %d dpi %dx%d pt %d\n", winfnt_header.pixel_height, winfnt_header.charset,
                       winfnt_header.vertical_resolution,winfnt_header.horizontal_resolution, winfnt_header.nominal_point_size);
-                if(TranslateCharsetInfo((DWORD*)(UINT)winfnt_header.charset, &csi, TCI_SRCCHARSET))
+                if(TranslateCharsetInfo((DWORD*)(UINT_PTR)winfnt_header.charset, &csi, TCI_SRCCHARSET))
                     memcpy(&fs, &csi.fs, sizeof(csi.fs));
                 internal_leading = winfnt_header.internal_leading;
             }
@@ -1901,7 +1901,7 @@ static int get_nearest_charset(Face *fac
     DWORD fs0;
 
     *cp = acp;
-    if(TranslateCharsetInfo((DWORD*)acp, &csi, TCI_SRCCODEPAGE))
+    if(TranslateCharsetInfo((DWORD*)(INT_PTR)acp, &csi, TCI_SRCCODEPAGE))
         if(csi.fs.fsCsb[0] & face->fs.fsCsb[0])
 	    return csi.ciCharset;
 
@@ -2305,7 +2305,7 @@ GdiFont WineEngCreateFontInstance(DC *dc
     if(!strcmpiW(lf.lfFaceName, SymbolW))
         lf.lfCharSet = SYMBOL_CHARSET;
 
-    if(!TranslateCharsetInfo((DWORD*)(INT)lf.lfCharSet, &csi, TCI_SRCCHARSET)) {
+    if(!TranslateCharsetInfo((DWORD*)(INT_PTR)lf.lfCharSet, &csi, TCI_SRCCHARSET)) {
         switch(lf.lfCharSet) {
 	case DEFAULT_CHARSET:
 	    csi.fs.fsCsb[0] = 0;
@@ -2351,7 +2351,7 @@ GdiFont WineEngCreateFontInstance(DC *dc
        corresponding to the current ansi codepage */
     if(!csi.fs.fsCsb[0]) {
         INT acp = GetACP();
-        if(!TranslateCharsetInfo((DWORD*)acp, &csi, TCI_SRCCODEPAGE)) {
+        if(!TranslateCharsetInfo((DWORD*)(INT_PTR)acp, &csi, TCI_SRCCODEPAGE)) {
             FIXME("TCI failed on codepage %d\n", acp);
             csi.fs.fsCsb[0] = 0;
         } else
@@ -3924,7 +3924,7 @@ DWORD WineEngGetFontData(GdiFont font, D
 			 DWORD cbData)
 {
     FT_Face ft_face = font->ft_face;
-    DWORD len;
+    FT_ULong len;
     FT_Error err;
 
     TRACE("font=%p, table=%08lx, offset=%08lx, buf=%p, cbData=%lx\n",
@@ -3947,7 +3947,7 @@ DWORD WineEngGetFontData(GdiFont font, D
     if(pFT_Load_Sfnt_Table) {
         /* make sure value of len is the value freetype says it needs */ 
         if( buf && len) {
-            DWORD needed = 0;
+            FT_ULong needed = 0;
             err = pFT_Load_Sfnt_Table(ft_face, table, offset, NULL, &needed);
             if( !err && needed < len) len = needed;
         }
@@ -3969,7 +3969,7 @@ #ifdef HAVE_FREETYPE_INTERNAL_SFNT_H
         }
         /* make sure value of len is the value freetype says it needs */ 
         if( buf && len) {
-            DWORD needed = 0;
+            FT_ULong needed = 0;
             err = sfnt->load_any(tt_face, table, offset, NULL, &needed);
             if( !err && needed < len) len = needed;
         }




More information about the wine-cvs mailing list