diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-20 06:53:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-20 06:53:39 +0000 |
commit | 4ba977846106b369f35bb2da6995f377e51af56b (patch) | |
tree | da6c25cb57a7b7ada07f394f491ce16b3bd113e7 /ext | |
parent | 935f8255922a78d5e96deeef1ce3c5258088bc54 (diff) | |
download | ruby-4ba977846106b369f35bb2da6995f377e51af56b.tar.gz |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/win32ole/win32ole.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 179b6362db..9518e2f0cd 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -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 |