1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
Yusuke Endoh 2019-08-24 20:31:16 +09:00
parent 97ad7862d5
commit 571ffcd609

View file

@ -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. */