aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-30 14:48:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-30 14:48:45 +0000
commitf6af68d95fd52d42571b941cb4ae2d610f9811b9 (patch)
tree8c1d084130a3fa64a9048221777828b39c2ed0eb /vm_method.c
parentae878bdd9f070059f1cf3b2c2fbeb9515d99ef1b (diff)
downloadruby-f6af68d95fd52d42571b941cb4ae2d610f9811b9.tar.gz
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
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 2 insertions, 2 deletions
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;