aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-14 11:44:20 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-14 11:47:22 +0900
commit0623e2b7cc621b1733a760b72af246b06c30cf96 (patch)
tree94724732da41c9f075b773ecc6d326fa36bb8807 /eval.c
parentc744b626985f5d78c6d8d8830b9aee2898412d7c (diff)
downloadruby-0623e2b7cc621b1733a760b72af246b06c30cf96.tar.gz
Suppress Uninitialized variables by Coverity Scan
Coverity Scan says: ``` ** CID 1452284: Uninitialized variables (UNINIT) /eval.c: 223 in rb_ec_cleanup() ``` ``` >>> CID 1452284: Uninitialized variables (UNINIT) >>> Using uninitialized value "errs[1]". ```
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 00cd56bc5d..3bd70f66c3 100644
--- a/eval.c
+++ b/eval.c
@@ -186,7 +186,7 @@ static int
rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex)
{
int state;
- volatile VALUE errs[2];
+ volatile VALUE errs[2] = { Qundef, Qundef };
int nerr;
rb_thread_t *th = rb_ec_thread_ptr(ec);
volatile int sysex = EXIT_SUCCESS;