aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-22 09:44:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-22 09:44:30 +0000
commitb746f128f466c5f17e6a5250de44242c39143b21 (patch)
treedb8eb9fd5ffc4e42f6a9f3db65ddb0569d1d337e /include
parent9a14e1726c6aeab30cc8d715dc5df06b8e3ebafc (diff)
downloadruby-b746f128f466c5f17e6a5250de44242c39143b21.tar.gz
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')
-rw-r--r--include/ruby/ruby.h4
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);