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

ruby-changes:33600

From: nobu <ko1@a...>
Date: Wed, 23 Apr 2014 11:51:42 +0900 (JST)
Subject: [ruby-changes:33600] nobu:r45681 (trunk): win32ole.c: fix format

nobu	2014-04-23 11:51:34 +0900 (Wed, 23 Apr 2014)

  New Revision: 45681

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

  Log:
    win32ole.c: fix format
    
    * ext/win32ole/win32ole.c (ole_excepinfo2msg, lcid_installed): fix
      format to suppress warnings.

  Modified files:
    trunk/ext/win32ole/win32ole.c
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 45680)
+++ ext/win32ole/win32ole.c	(revision 45681)
@@ -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:%X in ", pExInfo->scode);
+        sprintf(error_code, "\n    OLE error code:%lX in ", 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), "%08x", lcid);
+    snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08lx", lcid);
     EnumSystemLocales(installed_lcid_proc, LCID_INSTALLED);
     return g_lcid_installed;
 }

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

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