summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-24 11:47:04 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-24 11:50:38 +0900
commit2366c681166a1dab95de6b9ca8ffcaae18aadd39 (patch)
treec5fa10ccd66ce5fdc0a6535591e869650d26a99b /vm.c
parent14ba62d4881061a1d54b6204b0c4f0b4811ac921 (diff)
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
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index b76f9204ab..f26ab73dfe 100644
--- a/vm.c
+++ b/vm.c
@@ -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);