summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 12:57:14 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 12:57:14 +0000
commitc70f12c288cec94d3a7079ee3ffac3ee606d29ff (patch)
treea43afac2923153c33171564180408ce9a230c89a /ext/psych
parent4bf6a04f49a23ab33f6c9209a873c08b6f28fb37 (diff)
downloadruby-c70f12c288cec94d3a7079ee3ffac3ee606d29ff.tar.gz
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
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/yaml/scanner.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/psych/yaml/scanner.c b/ext/psych/yaml/scanner.c
index 3ef90dc66b..597281ec64 100644
--- a/ext/psych/yaml/scanner.c
+++ b/ext/psych/yaml/scanner.c
@@ -1186,11 +1186,9 @@ yaml_parser_increase_flow_level(yaml_parser_t *parser)
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;