Fix a -Wmaybe-uninitialized

lev in rb_gc_vm_lock() is uninitialized in single ractor mode.
This commit is contained in:
Nobuyoshi Nakada 2025-05-22 10:55:19 +09:00
parent 6a16c3e26d
commit 7154b4208b
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

2
gc.c
View File

@ -133,7 +133,7 @@
unsigned int unsigned int
rb_gc_vm_lock(void) rb_gc_vm_lock(void)
{ {
unsigned int lev; unsigned int lev = 0;
RB_VM_LOCK_ENTER_LEV(&lev); RB_VM_LOCK_ENTER_LEV(&lev);
return lev; return lev;
} }