ruby-changes:48150
From: kosaki <ko1@a...>
Date: Sat, 21 Oct 2017 22:02:08 +0900 (JST)
Subject: [ruby-changes:48150] kosaki:r60264 (trunk): kill "value computed is not used" warning
kosaki 2017-10-21 22:02:04 +0900 (Sat, 21 Oct 2017) New Revision: 60264 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60264 Log: kill "value computed is not used" warning Currently, gcc claims your coding style is not good. Shut it up. ../../../ext/psych/yaml/emitter.c: In function ?\226?\128?\152yaml_emitter_write_plain_scalar?\226?\128?\153: ../../../ext/psych/yaml/emitter.c:28:6: warning: value computed is not used [-Wunused-value] && ((emitter->line_break == YAML_CR_BREAK ? \ ^ Modified files: trunk/ext/psych/yaml/emitter.c Index: ext/psych/yaml/emitter.c =================================================================== --- ext/psych/yaml/emitter.c (revision 60263) +++ ext/psych/yaml/emitter.c (revision 60264) @@ -24,8 +24,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/psych/yaml/emitter.c#L24 */ #define PUT_BREAK(emitter) \ - (FLUSH(emitter) \ - && ((emitter->line_break == YAML_CR_BREAK ? \ + (FLUSH(emitter) ? \ + ((emitter->line_break == YAML_CR_BREAK ? \ (*(emitter->buffer.pointer++) = (yaml_char_t) '\r') : \ emitter->line_break == YAML_LN_BREAK ? \ (*(emitter->buffer.pointer++) = (yaml_char_t) '\n') : \ @@ -34,7 +34,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/psych/yaml/emitter.c#L34 *(emitter->buffer.pointer++) = (yaml_char_t) '\n') : 0), \ emitter->column = 0, \ emitter->line ++, \ - 1)) + 1) : 0) /* * Copy a character from a string into buffer. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/