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

io.c (rb_file_open_internal): initialize all the fields

Just for case.  This will suppress the warning of Coverity Scan.
This commit is contained in:
Yusuke Endoh 2019-07-14 15:23:15 +09:00
parent 2618db3011
commit 95de69df99

2
io.c
View file

@ -6228,6 +6228,8 @@ rb_file_open_internal(VALUE io, VALUE filename, const char *modestr)
if (p) {
parse_mode_enc(p+1, rb_usascii_encoding(),
&convconfig.enc, &convconfig.enc2, &fmode);
convconfig.ecflags = 0;
convconfig.ecopts = Qnil;
}
else {
rb_encoding *e;