summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-07-14 15:23:15 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-07-14 16:18:32 +0900
commit95de69df9906cde96d30aa2fbc6f5ed4891fdb9f (patch)
treead9c0f0c0edbac585f9db7e2f1e3959af2e53562 /io.c
parent2618db3011edb07fffb9250137ea3a3a6c87cec4 (diff)
io.c (rb_file_open_internal): initialize all the fields
Just for case. This will suppress the warning of Coverity Scan.
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io.c b/io.c
index 154b45e950..f78c09ba40 100644
--- a/io.c
+++ b/io.c
@@ -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;