method.h: suppress warnings
* method.h (METHOD_ENTRY_{VISI,BASIC,FLAGS}_SET): suppress shift-op-parentheses warnings. [Fix GH-1082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eb28bd8057
commit
0d65138c81
@ -1,3 +1,8 @@
|
|||||||
|
Sun Nov 8 14:24:43 2015 windwiny <windwiny.ubt@gmail.com>
|
||||||
|
|
||||||
|
* method.h (METHOD_ENTRY_{VISI,BASIC,FLAGS}_SET): suppress
|
||||||
|
shift-op-parentheses warnings. [Fix GH-1082]
|
||||||
|
|
||||||
Sun Nov 8 14:01:22 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
Sun Nov 8 14:01:22 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||||
|
|
||||||
* ext/psych/psych_emitter.c: bakcport 5bd7744 from tenderlove/psych.
|
* ext/psych/psych_emitter.c: bakcport 5bd7744 from tenderlove/psych.
|
||||||
|
6
method.h
6
method.h
@ -70,13 +70,13 @@ static inline void
|
|||||||
METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
|
METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
|
||||||
{
|
{
|
||||||
VM_ASSERT((int)visi >= 0 && visi <= 3);
|
VM_ASSERT((int)visi >= 0 && visi <= 3);
|
||||||
me->flags = (me->flags & ~(IMEMO_FL_USER0 | IMEMO_FL_USER1)) | (visi << IMEMO_FL_USHIFT+0);
|
me->flags = (me->flags & ~(IMEMO_FL_USER0 | IMEMO_FL_USER1)) | (visi << (IMEMO_FL_USHIFT+0));
|
||||||
}
|
}
|
||||||
static inline void
|
static inline void
|
||||||
METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
|
METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
|
||||||
{
|
{
|
||||||
VM_ASSERT(basic <= 1);
|
VM_ASSERT(basic <= 1);
|
||||||
me->flags = (me->flags & ~(IMEMO_FL_USER2 )) | (basic << IMEMO_FL_USHIFT+2);
|
me->flags = (me->flags & ~(IMEMO_FL_USER2 )) | (basic << (IMEMO_FL_USHIFT+2));
|
||||||
}
|
}
|
||||||
static inline void
|
static inline void
|
||||||
METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
|
METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
|
||||||
@ -85,7 +85,7 @@ METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsig
|
|||||||
VM_ASSERT(basic <= 1);
|
VM_ASSERT(basic <= 1);
|
||||||
me->flags =
|
me->flags =
|
||||||
(me->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2)) |
|
(me->flags & ~(IMEMO_FL_USER0|IMEMO_FL_USER1|IMEMO_FL_USER2)) |
|
||||||
((visi << IMEMO_FL_USHIFT+0) | (basic << (IMEMO_FL_USHIFT+2)));
|
((visi << (IMEMO_FL_USHIFT+0)) | (basic << (IMEMO_FL_USHIFT+2)));
|
||||||
}
|
}
|
||||||
static inline void
|
static inline void
|
||||||
METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
|
METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user