ruby-changes:57237
From: Yusuke <ko1@a...>
Date: Sat, 24 Aug 2019 20:32:56 +0900 (JST)
Subject: [ruby-changes:57237] Yusuke Endoh: 571ffcd609 (master): ext/psych/yaml/api.c: Suppress a "variable set but not used" warning
https://git.ruby-lang.org/ruby.git/commit/?id=571ffcd609 From 571ffcd6094ccf1c68d4bfc36e425e0ee524e8b4 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 24 Aug 2019 20:31:16 +0900 Subject: ext/psych/yaml/api.c: Suppress a "variable set but not used" warning ``` compiling ../.././ext/psych/yaml/api.c ../.././ext/psych/yaml/api.c: In function 'yaml_document_delete': ../.././ext/psych/yaml/api.c:1122:7: warning: variable 'context' set but not used [-Wunused-but-set-variable] } context; ^~~~~~~ ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-master/log/20190824T093004Z.log.html.gz diff --git a/ext/psych/yaml/api.c b/ext/psych/yaml/api.c index 03c1379..95dc6b4 100644 --- a/ext/psych/yaml/api.c +++ b/ext/psych/yaml/api.c @@ -1122,7 +1122,9 @@ yaml_document_delete(yaml_document_t *document) https://github.com/ruby/ruby/blob/trunk/ext/psych/yaml/api.c#L1122 } context; yaml_tag_directive_t *tag_directive; - context.error = YAML_NO_ERROR; /* Eliminate a compliler warning. */ + /* Eliminate a compliler warning. */ + context.error = YAML_NO_ERROR; + (void)context.error; assert(document); /* Non-NULL document object is expected. */ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/