diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-22 09:44:30 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-22 09:44:30 +0000 |
commit | 5153260c309d19aef3b34dad5e1da05c3dbf1e9e (patch) | |
tree | db8eb9fd5ffc4e42f6a9f3db65ddb0569d1d337e /include/ruby/ruby.h | |
parent | ac8f9a0af7b108f03b58b8077492e845a30f08c1 (diff) |
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
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 4 |
1 files changed, 2 insertions, 2 deletions
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); |