1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

kill "variable set but not used" warning

Currently, scanner.c makes following warning. Fix it.

../../../ext/psych/yaml/scanner.c: In function ‘yaml_parser_decrease_flow_level’:
../../../ext/psych/yaml/scanner.c:1189:23: warning: variable ‘dummy_key’ set but not used [-Wunused-but-set-variable]
     yaml_simple_key_t dummy_key;    /* Used to eliminate a compiler warning. */

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2017-10-21 12:57:14 +00:00
parent 4bf6a04f49
commit c70f12c288

View file

@ -1186,11 +1186,9 @@ yaml_parser_increase_flow_level(yaml_parser_t *parser)
static int static int
yaml_parser_decrease_flow_level(yaml_parser_t *parser) 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) { if (parser->flow_level) {
parser->flow_level --; parser->flow_level --;
dummy_key = POP(parser, parser->simple_keys); (void)POP(parser, parser->simple_keys);
} }
return 1; return 1;