ruby-changes:40409
From: nobu <ko1@a...>
Date: Sun, 8 Nov 2015 14:24:56 +0900 (JST)
Subject: [ruby-changes:40409] nobu:r52490 (trunk): method.h: suppress warnings
nobu 2015-11-08 14:24:45 +0900 (Sun, 08 Nov 2015) New Revision: 52490 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52490 Log: method.h: suppress warnings * method.h (METHOD_ENTRY_{VISI,BASIC,FLAGS}_SET): suppress shift-op-parentheses warnings. [Fix GH-1082] Modified files: trunk/ChangeLog trunk/method.h Index: method.h =================================================================== --- method.h (revision 52489) +++ method.h (revision 52490) @@ -70,13 +70,13 @@ static inline void https://github.com/ruby/ruby/blob/trunk/method.h#L70 METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi) { 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 METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic) { 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 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 https://github.com/ruby/ruby/blob/trunk/method.h#L85 VM_ASSERT(basic <= 1); me->flags = (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 METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src) Index: ChangeLog =================================================================== --- ChangeLog (revision 52489) +++ ChangeLog (revision 52490) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Nov 8 14:24:43 2015 windwiny <windwiny.ubt@g...> + + * 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@r...> * ext/psych/psych_emitter.c: bakcport 5bd7744 from tenderlove/psych. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/