From b746f128f466c5f17e6a5250de44242c39143b21 Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 22 Dec 2016 09:44:30 +0000 Subject: suppress warning: implicit conversion changes signedness It causes [Bug #13060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index faccc2e896..8f4b0929ba 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -441,7 +441,7 @@ enum ruby_special_consts { #endif #define SYMBOL_FLAG RUBY_SYMBOL_FLAG -#define RB_TEST(v) !(((VALUE)(v) & ~RUBY_Qnil) == 0) +#define RB_TEST(v) !(((VALUE)(v) & (VALUE)~RUBY_Qnil) == 0) #define RB_NIL_P(v) !((VALUE)(v) != RUBY_Qnil) #define RTEST(v) RB_TEST(v) #define NIL_P(v) RB_NIL_P(v) @@ -1617,7 +1617,7 @@ rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize) } else { size_t size, max = LONG_MAX - sizeof(VALUE) + 1; - if (RB_UNLIKELY(rb_mul_size_overflow(count, elsize, max, &size))) { + if (RB_UNLIKELY(rb_mul_size_overflow(cnt, elsize, max, &size))) { ruby_malloc_size_overflow(cnt, elsize); } cnt = (size + sizeof(VALUE) - 1) / sizeof(VALUE); -- cgit v1.2.3