From 0623e2b7cc621b1733a760b72af246b06c30cf96 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Wed, 14 Aug 2019 11:44:20 +0900 Subject: 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]". ``` --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') 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; -- cgit v1.2.1