[前][次][番号順一覧][スレッド一覧]

ruby-changes:33603

From: nobu <ko1@a...>
Date: Wed, 23 Apr 2014 13:14:50 +0900 (JST)
Subject: [ruby-changes:33603] nobu:r45684 (trunk): win32ole.c: suppress warnings

nobu	2014-04-23 13:14:42 +0900 (Wed, 23 Apr 2014)

  New Revision: 45684

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45684

  Log:
    win32ole.c: suppress warnings
    
    * ext/win32ole/win32ole.c (ole_excepinfo2msg, lcid_installed):
      cast to suppress warnings, SCODE varies on cygwin and mingw.

  Modified files:
    trunk/ext/win32ole/win32ole.c
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 45683)
+++ ext/win32ole/win32ole.c	(revision 45684)
@@ -1180,7 +1180,7 @@ ole_excepinfo2msg(EXCEPINFO *pExInfo) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L1180
         pDescription = ole_wc2mb(pExInfo->bstrDescription);
     }
     if(pExInfo->wCode == 0) {
-        sprintf(error_code, "\n    OLE error code:%lX in ", pExInfo->scode);
+        sprintf(error_code, "\n    OLE error code:%lX in ", (unsigned long)pExInfo->scode);
     }
     else{
         sprintf(error_code, "\n    OLE error code:%u in ", pExInfo->wCode);
@@ -3112,7 +3112,7 @@ static BOOL https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L3112
 lcid_installed(LCID lcid)
 {
     g_lcid_installed = FALSE;
-    snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08lx", lcid);
+    snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08lx", (unsigned long)lcid);
     EnumSystemLocales(installed_lcid_proc, LCID_INSTALLED);
     return g_lcid_installed;
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]