summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-30 13:37:07 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-30 13:37:07 +0900
commit1484b786aee8d411a9e2278ac6d6e44aedbf6662 (patch)
treeeb6d445d978c03c759dfa6c803ed31f70c095109
parent388281c5c92d4c04bfb08aeac7513770de9ea128 (diff)
Suppress warnings
``` compiling ../mjit.c In file included from ../mjit.c:28: ../mjit_worker.c:1270:33: warning: incompatible pointer to integer conversion passing 'const struct rb_callcache *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion] assert(BUILTIN_TYPE(cc) != T_MOVED); ^~ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ ../include/ruby/internal/value_type.h:153:23: note: passing argument to parameter 'obj' here RB_BUILTIN_TYPE(VALUE obj) ^ In file included from ../mjit.c:28: ../mjit_worker.c:1271:33: warning: incompatible pointer to integer conversion passing 'const struct rb_callable_method_entry_struct *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion] assert(BUILTIN_TYPE(vm_cc_cme(cc)) != T_MOVED); ^~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ ../include/ruby/internal/value_type.h:153:23: note: passing argument to parameter 'obj' here RB_BUILTIN_TYPE(VALUE obj) ^ In file included from ../mjit.c:28: ../mjit_worker.c:1272:50: warning: incompatible pointer to integer conversion passing 'const struct rb_callcache *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion] assert(!rb_objspace_garbage_object_p(cc)); ^~ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ ../gc.h:128:40: note: passing argument to parameter 'obj' here int rb_objspace_garbage_object_p(VALUE obj); ^ In file included from ../mjit.c:28: ../mjit_worker.c:1273:50: warning: incompatible pointer to integer conversion passing 'const struct rb_callable_method_entry_struct *' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion] assert(!rb_objspace_garbage_object_p(vm_cc_cme(cc))); ^~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) ^ ../gc.h:128:40: note: passing argument to parameter 'obj' here int rb_objspace_garbage_object_p(VALUE obj); ^ 4 warnings generated. ```
-rw-r--r--mjit_worker.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 160b8cf..461b10f 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -1267,10 +1267,10 @@ mjit_capture_cc_entries(const struct rb_iseq_constant_body *compiled_iseq, const
const struct rb_callcache *cc = cc_entries[i];
if (cc && vm_cc_markable(cc)) {
- assert(BUILTIN_TYPE(cc) != T_MOVED);
- assert(BUILTIN_TYPE(vm_cc_cme(cc)) != T_MOVED);
- assert(!rb_objspace_garbage_object_p(cc));
- assert(!rb_objspace_garbage_object_p(vm_cc_cme(cc)));
+ assert(BUILTIN_TYPE((VALUE)cc) != T_MOVED);
+ assert(BUILTIN_TYPE((VALUE)vm_cc_cme(cc)) != T_MOVED);
+ assert(!rb_objspace_garbage_object_p((VALUE)cc));
+ assert(!rb_objspace_garbage_object_p((VALUE)vm_cc_cme(cc)));
}
}