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

ruby-changes:34898

From: nobu <ko1@a...>
Date: Mon, 28 Jul 2014 05:51:51 +0900 (JST)
Subject: [ruby-changes:34898] nobu:r46981 (trunk): win32ole.c: suppress warning

nobu	2014-07-28 05:51:46 +0900 (Mon, 28 Jul 2014)

  New Revision: 46981

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

  Log:
    win32ole.c: suppress warning
    
    * ext/win32ole/win32ole.c (ole_rec2variant): cast to suppress a
      format warning on x86_64-cygwin.

  Modified files:
    trunk/ext/win32ole/win32ole.c
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 46980)
+++ ext/win32ole/win32ole.c	(revision 46981)
@@ -1710,7 +1710,7 @@ ole_rec2variant(VALUE rec, VARIANT *var) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L1710
         }
         prec->pdata = ALLOC_N(char, size);
         if (!prec->pdata) {
-            rb_raise(rb_eRuntimeError, "failed to memory allocation of %ld bytes", size);
+            rb_raise(rb_eRuntimeError, "failed to memory allocation of %lu bytes", (unsigned long)size);
         }
         hr = pri->lpVtbl->RecordInit(pri, prec->pdata);
         if (FAILED(hr)) {

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

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