зеркало из https://github.com/github/ruby.git
Fix a -Wmaybe-uninitialized
With the body of functions available, GCC noticed that lev is uninitialized in rb_gc_vm_lock_no_barrier() in single ractor mode.
This commit is contained in:
Родитель
0ada02abe2
Коммит
a06cfa7e89
2
gc.c
2
gc.c
|
@ -157,7 +157,7 @@ rb_gc_cr_unlock(unsigned int lev)
|
|||
unsigned int
|
||||
rb_gc_vm_lock_no_barrier(void)
|
||||
{
|
||||
unsigned int lev;
|
||||
unsigned int lev = 0;
|
||||
RB_VM_LOCK_ENTER_LEV_NB(&lev);
|
||||
return lev;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче