From 75a0447c15a7ab017bd4240c2a9cc69b134b80b9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 17 Apr 2020 08:14:38 +0900 Subject: [PATCH] Suppress C4267 "possible loss of data" warnings Just cast down explicitly. --- ext/win32ole/win32ole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index cd5a62d36d..4b55f6ea54 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) /*------------------------------------------ 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);