suppress meddlesome clang10 warrning

It says:

vm.c:2519:34: warning: expression does not compute the number of elements in this array; element type is 'const struct __jmp_buf_tag', not 'VALUE' (aka 'unsigned long') [-Wsizeof-array-div]
                             sizeof(ec->machine.regs) / sizeof(VALUE));
                                    ~~~~~~~~~~~~~~~~  ^
vm.c:2519:34: note: place parentheses around the 'sizeof(VALUE)' expression to silence this warning
This commit is contained in:
卜部昌平 2019-09-24 11:47:04 +09:00
parent 14ba62d488
commit 2366c68116

2
vm.c
View File

@ -2516,7 +2516,7 @@ rb_execution_context_mark(const rb_execution_context_t *ec)
rb_gc_mark_machine_stack(ec);
rb_gc_mark_locations((VALUE *)&ec->machine.regs,
(VALUE *)(&ec->machine.regs) +
sizeof(ec->machine.regs) / sizeof(VALUE));
sizeof(ec->machine.regs) / (sizeof(VALUE)));
}
RUBY_MARK_UNLESS_NULL(ec->errinfo);