From 4ef663e36302f77059e12e507fb4178c5c2429f6 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh 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 --- ext/psych/yaml/api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext') 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) } 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 v1.2.3