diff options
author | Peter Zhu <[email protected]> | 2022-02-22 10:15:21 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2022-02-22 10:16:31 -0500 |
commit | 2ea175eb692dfc250af8f1ea8f60ff25490ccf08 (patch) | |
tree | 32f84fff98bcdfe42d1ef4e678266538b93d295d /vm_backtrace.c | |
parent | 2d5ecd60a5827d95449b9bd8704a0df2ffb0a60a (diff) |
Fix compiler warning for uninitialized variable
Fixes this compiler warning:
warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
bt_yield_loc(loc - cfunc_counter, cfunc_counter, btobj);
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r-- | vm_backtrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c index cc4e8875fc..27e108af61 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -590,7 +590,7 @@ rb_ec_partial_backtrace_object(const rb_execution_context_t *ec, long start_fram ptrdiff_t size; rb_backtrace_t *bt; VALUE btobj = backtrace_alloc(rb_cBacktrace); - rb_backtrace_location_t *loc; + rb_backtrace_location_t *loc = NULL; unsigned long cfunc_counter = 0; GetCoreDataFromValue(btobj, rb_backtrace_t, bt); |