ruby-changes:62824
From: Nobuyoshi <ko1@a...>
Date: Fri, 4 Sep 2020 11:57:14 +0900 (JST)
Subject: [ruby-changes:62824] 169b1d1aca (master): Initialize loop variables of list_for_each for MS VC
https://git.ruby-lang.org/ruby.git/commit/?id=169b1d1aca From 169b1d1aca0c26d38f8bbd25ecaf5fdb8015f5cf Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 4 Sep 2020 11:46:50 +0900 Subject: Initialize loop variables of list_for_each for MS VC diff --git a/ractor.c b/ractor.c index 9059d42..a0cd092 100644 --- a/ractor.c +++ b/ractor.c @@ -177,7 +177,7 @@ ractor_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/ractor.c#L177 rb_gc_mark(r->r_stderr); if (r->threads.cnt > 0) { - rb_thread_t *th; + rb_thread_t *th = 0; list_for_each(&r->threads.set, th, lt_node) { VM_ASSERT(th != NULL); rb_gc_mark(th->self); @@ -1640,7 +1640,7 @@ ractor_terminal_interrupt_all(rb_vm_t *vm) https://github.com/ruby/ruby/blob/trunk/ractor.c#L1640 { if (vm->ractor.cnt > 1) { // send terminate notification to all ractors - rb_ractor_t *r; + rb_ractor_t *r = 0; list_for_each(&vm->ractor.set, r, vmlr_node) { if (r != vm->ractor.main_ractor) { rb_ractor_terminate_interrupt_main_thread(r); @@ -1795,7 +1795,7 @@ void https://github.com/ruby/ruby/blob/trunk/ractor.c#L1795 rb_ractor_dump(void) { rb_vm_t *vm = GET_VM(); - rb_ractor_t *r; + rb_ractor_t *r = 0; list_for_each(&vm->ractor.set, r, vmlr_node) { if (r != vm->ractor.main_ractor) { diff --git a/vm.c b/vm.c index f2ce857..15b305e 100644 --- a/vm.c +++ b/vm.c @@ -2324,7 +2324,7 @@ rb_vm_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L2324 RUBY_GC_INFO("-------------------------------------------------\n"); if (ptr) { rb_vm_t *vm = ptr; - rb_ractor_t *r; + rb_ractor_t *r = 0; long i, len; const VALUE *obj_ary; diff --git a/vm_sync.c b/vm_sync.c index e3104d1..d5b25e5 100644 --- a/vm_sync.c +++ b/vm_sync.c @@ -224,7 +224,7 @@ rb_vm_barrier(void) https://github.com/ruby/ruby/blob/trunk/vm_sync.c#L224 rb_vm_ractor_blocking_cnt_inc(vm, cr, __FILE__, __LINE__); // send signal - rb_ractor_t *r; + rb_ractor_t *r = 0; list_for_each(&vm->ractor.set, r, vmlr_node) { if (r != cr) { rb_ractor_vm_barrier_interrupt_running_thread(r); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/