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

ruby-changes:44777

From: nobu <ko1@a...>
Date: Sun, 20 Nov 2016 15:53:44 +0900 (JST)
Subject: [ruby-changes:44777] nobu:r56850 (trunk): win32ole.c: suppress warnings

nobu	2016-11-20 15:53:39 +0900 (Sun, 20 Nov 2016)

  New Revision: 56850

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

  Log:
    win32ole.c: suppress warnings
    
    * ext/win32ole/win32ole.c (g_ole_initialized): compare with 0
      instead of cast to get rid of pointer-to-int-cast warnings.

  Modified files:
    trunk/ext/win32ole/win32ole.c
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 56849)
+++ ext/win32ole/win32ole.c	(revision 56850)
@@ -42,7 +42,7 @@ static RB_THREAD_SPECIFIC BOOL g_ole_ini https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L42
 # define g_ole_initialized_set(val) (g_ole_initialized = (val))
 #else
 static volatile DWORD g_ole_initialized_key = TLS_OUT_OF_INDEXES;
-# define g_ole_initialized (BOOL)TlsGetValue(g_ole_initialized_key)
+# define g_ole_initialized (TlsGetValue(g_ole_initialized_key)!=0)
 # define g_ole_initialized_init() (g_ole_initialized_key = TlsAlloc())
 # define g_ole_initialized_set(val) TlsSetValue(g_ole_initialized_key, (void*)(val))
 #endif

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

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