diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-08-24 20:31:16 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-08-24 20:31:16 +0900 |
commit | 571ffcd6094ccf1c68d4bfc36e425e0ee524e8b4 (patch) | |
tree | 51edd3ccd71a03c62399bcd1d27a3cdf63a0874e /ext | |
parent | 97ad7862d5f65c48409a5301609af8448aaae16d (diff) | |
download | ruby-571ffcd6094ccf1c68d4bfc36e425e0ee524e8b4.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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/psych/yaml/api.c b/ext/psych/yaml/api.c index 03c137905a..95dc6b4de3 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. */ |