ruby-changes:32998
From: nagachika <ko1@a...>
Date: Fri, 21 Feb 2014 20:56:01 +0900 (JST)
Subject: [ruby-changes:32998] nagachika:r45077 (ruby_2_0_0): merge revision(s) r45003: [Backport #9481]
nagachika 2014-02-21 20:55:57 +0900 (Fri, 21 Feb 2014) New Revision: 45077 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45077 Log: merge revision(s) r45003: [Backport #9481] ext/psych/yaml: suppress warnings * ext/psych/yaml/emitter.c (WRITE_BREAK, PUT_BREAK): suppress unused-value warnings. * ext/psych/yaml/parser.c, ext/psych/yaml/scanner.c: suppress unused-but-set-variable warnings. * ext/psych/yaml/yaml_private.h (STACK_EMPTY): ditto. Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ext/psych/yaml/emitter.c branches/ruby_2_0_0/ext/psych/yaml/parser.c branches/ruby_2_0_0/ext/psych/yaml/scanner.c branches/ruby_2_0_0/ext/psych/yaml/yaml_private.h branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ext/psych/yaml/yaml_private.h =================================================================== --- ruby_2_0_0/ext/psych/yaml/yaml_private.h (revision 45076) +++ ruby_2_0_0/ext/psych/yaml/yaml_private.h (revision 45077) @@ -433,7 +433,8 @@ yaml_queue_extend(void **start, void **h https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/yaml_private.h#L433 (stack).start = (stack).top = (stack).end = 0) #define STACK_EMPTY(context,stack) \ - ((stack).start == (stack).top) + ((void)(context), \ + ((stack).start == (stack).top)) #define STACK_LIMIT(context,stack,size) \ ((stack).top - (stack).start < (size) ? \ Index: ruby_2_0_0/ext/psych/yaml/emitter.c =================================================================== --- ruby_2_0_0/ext/psych/yaml/emitter.c (revision 45076) +++ ruby_2_0_0/ext/psych/yaml/emitter.c (revision 45077) @@ -53,7 +53,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/emitter.c#L53 #define WRITE_BREAK(emitter,string) \ (FLUSH(emitter) \ && (CHECK(string,'\n') ? \ - (PUT_BREAK(emitter), \ + ((void)PUT_BREAK(emitter), \ string.pointer ++, \ 1) : \ (COPY(emitter->buffer,string), \ Index: ruby_2_0_0/ext/psych/yaml/scanner.c =================================================================== --- ruby_2_0_0/ext/psych/yaml/scanner.c (revision 45076) +++ ruby_2_0_0/ext/psych/yaml/scanner.c (revision 45077) @@ -1193,11 +1193,9 @@ yaml_parser_increase_flow_level(yaml_par https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/scanner.c#L1193 static int yaml_parser_decrease_flow_level(yaml_parser_t *parser) { - yaml_simple_key_t dummy_key; /* Used to eliminate a compiler warning. */ - if (parser->flow_level) { parser->flow_level --; - dummy_key = POP(parser, parser->simple_keys); + (void)POP(parser, parser->simple_keys); } return 1; Index: ruby_2_0_0/ext/psych/yaml/parser.c =================================================================== --- ruby_2_0_0/ext/psych/yaml/parser.c (revision 45076) +++ ruby_2_0_0/ext/psych/yaml/parser.c (revision 45077) @@ -759,9 +759,8 @@ yaml_parser_parse_block_sequence_entry(y https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/parser.c#L759 else if (token->type == YAML_BLOCK_END_TOKEN) { - yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */ parser->state = POP(parser, parser->states); - dummy_mark = POP(parser, parser->marks); + (void)POP(parser, parser->marks); SEQUENCE_END_EVENT_INIT(*event, token->start_mark, token->end_mark); SKIP_TOKEN(parser); return 1; @@ -869,9 +868,8 @@ yaml_parser_parse_block_mapping_key(yaml https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/parser.c#L868 else if (token->type == YAML_BLOCK_END_TOKEN) { - yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */ parser->state = POP(parser, parser->states); - dummy_mark = POP(parser, parser->marks); + (void)POP(parser, parser->marks); MAPPING_END_EVENT_INIT(*event, token->start_mark, token->end_mark); SKIP_TOKEN(parser); return 1; @@ -952,7 +950,6 @@ yaml_parser_parse_flow_sequence_entry(ya https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/parser.c#L950 yaml_event_t *event, int first) { yaml_token_t *token; - yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */ if (first) { token = PEEK_TOKEN(parser); @@ -997,7 +994,7 @@ yaml_parser_parse_flow_sequence_entry(ya https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/parser.c#L994 } parser->state = POP(parser, parser->states); - dummy_mark = POP(parser, parser->marks); + (void)POP(parser, parser->marks); SEQUENCE_END_EVENT_INIT(*event, token->start_mark, token->end_mark); SKIP_TOKEN(parser); return 1; @@ -1104,7 +1101,6 @@ yaml_parser_parse_flow_mapping_key(yaml_ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/parser.c#L1101 yaml_event_t *event, int first) { yaml_token_t *token; - yaml_mark_t dummy_mark; /* Used to eliminate a compiler warning. */ if (first) { token = PEEK_TOKEN(parser); @@ -1158,7 +1154,7 @@ yaml_parser_parse_flow_mapping_key(yaml_ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/psych/yaml/parser.c#L1154 } parser->state = POP(parser, parser->states); - dummy_mark = POP(parser, parser->marks); + (void)POP(parser, parser->marks); MAPPING_END_EVENT_INIT(*event, token->start_mark, token->end_mark); SKIP_TOKEN(parser); return 1; Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 45076) +++ ruby_2_0_0/version.h (revision 45077) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" -#define RUBY_RELEASE_DATE "2014-02-20" -#define RUBY_PATCHLEVEL 442 +#define RUBY_RELEASE_DATE "2014-02-21" +#define RUBY_PATCHLEVEL 443 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 20 +#define RUBY_RELEASE_DAY 21 #include "ruby/version.h" Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r45003 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/