From 2b582b7ca689277e63e901272b1112d19b8a914d Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 30 Jul 2017 14:48:45 +0000 Subject: UNALIGNED_MEMBER_ACCESS * eval_intern.h (UNALIGNED_MEMBER_ACCESS): suppress address-of-packed-member warnings by clang 4.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_method.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_method.c') diff --git a/vm_method.c b/vm_method.c index 3be7213678..919c238f65 100644 --- a/vm_method.c +++ b/vm_method.c @@ -252,7 +252,7 @@ method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, case VM_METHOD_TYPE_CFUNC: { rb_method_cfunc_t *cfunc = (rb_method_cfunc_t *)opts; - setup_method_cfunc_struct(&def->body.cfunc, cfunc->func, cfunc->argc); + setup_method_cfunc_struct(UNALIGNED_MEMBER_PTR(def, body.cfunc), cfunc->func, cfunc->argc); return; } case VM_METHOD_TYPE_ATTRSET: @@ -279,7 +279,7 @@ method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, RB_OBJ_WRITE(me, &def->body.proc, (VALUE)opts); return; case VM_METHOD_TYPE_NOTIMPLEMENTED: - setup_method_cfunc_struct(&def->body.cfunc, rb_f_notimplement, -1); + setup_method_cfunc_struct(UNALIGNED_MEMBER_PTR(def, body.cfunc), rb_f_notimplement, -1); return; case VM_METHOD_TYPE_OPTIMIZED: def->body.optimize_type = (enum method_optimized_type)opts; -- cgit v1.2.3