From 2366c681166a1dab95de6b9ca8ffcaae18aadd39 Mon Sep 17 00:00:00 2001 From: 卜部昌平 Date: Tue, 24 Sep 2019 11:47:04 +0900 Subject: 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 --- vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm.c') 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); -- cgit v1.2.3