зеркало из https://github.com/github/ruby.git
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:
Родитель
88f3ce12d3
Коммит
97e6c28db4
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче