summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-08-24 20:31:16 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-12 10:48:26 +0900
commit4ef663e36302f77059e12e507fb4178c5c2429f6 (patch)
tree36091dcf6bf976d5a041ab107f156d4349402dba /ext
parentcfef90212229035f132e634367dc75772a98b4ae (diff)
downloadpsych-4ef663e36302f77059e12e507fb4178c5c2429f6.tar.gz
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
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/yaml/api.c4
1 files changed, 3 insertions, 1 deletions
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. */