mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Initialize loop variables of list_for_each for MS VC
This commit is contained in:
parent
d4585e7470
commit
169b1d1aca
3 changed files with 5 additions and 5 deletions
6
ractor.c
6
ractor.c
|
@ -177,7 +177,7 @@ ractor_mark(void *ptr)
|
|||
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)
|
|||
{
|
||||
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
|
|||
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) {
|
||||
|
|
2
vm.c
2
vm.c
|
@ -2324,7 +2324,7 @@ rb_vm_mark(void *ptr)
|
|||
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;
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ rb_vm_barrier(void)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue