]> granicus.if.org Git - nethack/commitdiff
Fix compiler warning where we cast 32bit value to pointer.
authorBart House <bart@barthouse.com>
Sat, 2 Sep 2017 18:48:32 +0000 (11:48 -0700)
committerPasi Kallinen <paxed@alt.org>
Mon, 4 Sep 2017 09:41:53 +0000 (12:41 +0300)
win/win32/mhfont.c

index c0441998234c1b6545d32a191b433cd702140c5d..1b802f2d064d3f18df721d06df693ee42b6c600c 100644 (file)
@@ -206,11 +206,11 @@ mswin_charset()
 {
     CHARSETINFO cis;
     if (SYMHANDLING(H_IBM))
-        if (TranslateCharsetInfo((DWORD *) GetOEMCP(), &cis, TCI_SRCCODEPAGE))
+        if (TranslateCharsetInfo((DWORD *) (uintptr_t) GetOEMCP(), &cis, TCI_SRCCODEPAGE))
             return cis.ciCharset;
         else
             return OEM_CHARSET;
-    else if (TranslateCharsetInfo((DWORD *) GetACP(), &cis, TCI_SRCCODEPAGE))
+    else if (TranslateCharsetInfo((DWORD *) (uintptr_t) GetACP(), &cis, TCI_SRCCODEPAGE))
         return cis.ciCharset;
     else
         return ANSI_CHARSET;