From 11d5a8318dd5e30bb3ecab80e2f2177bcdef3e34 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 8 Apr 2020 18:03:46 +0900 Subject: Suppress C4244 "possible loss of data" warnings --- include/ruby/3/core/rarray.h | 2 +- include/ruby/3/core/rstring.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/3/core/rarray.h b/include/ruby/3/core/rarray.h index ddc50117ef..f4f6809874 100644 --- a/include/ruby/3/core/rarray.h +++ b/include/ruby/3/core/rarray.h @@ -123,7 +123,7 @@ RARRAY_EMBED_LEN(VALUE ary) VALUE f = RBASIC(ary)->flags; f &= RARRAY_EMBED_LEN_MASK; f >>= RARRAY_EMBED_LEN_SHIFT; - return f; + return (long)f; } RUBY3_ATTR_PURE_ON_NDEBUG() diff --git a/include/ruby/3/core/rstring.h b/include/ruby/3/core/rstring.h index 266edca9b6..3d40f850bc 100644 --- a/include/ruby/3/core/rstring.h +++ b/include/ruby/3/core/rstring.h @@ -108,7 +108,7 @@ RSTRING_EMBED_LEN(VALUE str) VALUE f = RBASIC(str)->flags; f &= RSTRING_EMBED_LEN_MASK; f >>= RSTRING_EMBED_LEN_SHIFT; - return f; + return (long)f; } RUBY3_ATTR_PURE_ON_NDEBUG() -- cgit v1.2.3