[前][次][番号順一覧][スレッド一覧]

ruby-changes:56464

From: Yusuke <ko1@a...>
Date: Sun, 14 Jul 2019 16:18:50 +0900 (JST)
Subject: [ruby-changes:56464] Yusuke Endoh: 95de69df99 (master): io.c (rb_file_open_internal): initialize all the fields

https://git.ruby-lang.org/ruby.git/commit/?id=95de69df99

From 95de69df9906cde96d30aa2fbc6f5ed4891fdb9f Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Sun, 14 Jul 2019 15:23:15 +0900
Subject: io.c (rb_file_open_internal): initialize all the fields

Just for case.  This will suppress the warning of Coverity Scan.

diff --git a/io.c b/io.c
index 154b45e..f78c09b 100644
--- a/io.c
+++ b/io.c
@@ -6228,6 +6228,8 @@ rb_file_open_internal(VALUE io, VALUE filename, const char *modestr) https://github.com/ruby/ruby/blob/trunk/io.c#L6228
     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;
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]