ruby-changes:60803
From: Nobuyoshi <ko1@a...>
Date: Fri, 17 Apr 2020 09:25:13 +0900 (JST)
Subject: [ruby-changes:60803] 75a0447c15 (master): Suppress C4267 "possible loss of data" warnings
https://git.ruby-lang.org/ruby.git/commit/?id=75a0447c15 From 75a0447c15a7ab017bd4240c2a9cc69b134b80b9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 17 Apr 2020 08:14:38 +0900 Subject: Suppress C4267 "possible loss of data" warnings Just cast down explicitly. diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index cd5a62d..4b55f6e 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -2651,7 +2651,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L2651 /*------------------------------------------ hash object ==> named dispatch parameters --------------------------------------------*/ - cNamedArgs = SIZET2NUM(RHASH_SIZE(param)); + cNamedArgs = rb_long2int((long)RHASH_SIZE(param)); op.dp.cArgs = cNamedArgs + argc - 2; op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1); op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/