1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-20 06:53:39 +00:00
parent 935f825592
commit 4ba9778461

View file

@ -42,7 +42,7 @@ static RB_THREAD_SPECIFIC BOOL g_ole_initialized;
# 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