mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Narrowed down unaligned member access region in RB_OBJ_WRITE
Since UNALIGNED_MEMBER_ACCESS assigns to an intermediate variable, it can cause unused-value warnings.
This commit is contained in:
parent
88f3ce12d3
commit
97e6c28db4
1 changed files with 2 additions and 2 deletions
|
@ -58,8 +58,8 @@ struct rb_objspace; /* in vm_core.h */
|
|||
|
||||
#define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
|
||||
#define RB_OBJ_WRITE(a, slot, b) \
|
||||
UNALIGNED_MEMBER_ACCESS(\
|
||||
rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
|
||||
rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), \
|
||||
(VALUE)(b), __FILE__, __LINE__)
|
||||
|
||||
/* gc.c */
|
||||
extern VALUE *ruby_initial_gc_stress_ptr;
|
||||
|
|
Loading…
Reference in a new issue