Skip to content

Commit 2ea175e

Browse files
committed
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);
1 parent 2d5ecd6 commit 2ea175e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm_backtrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ rb_ec_partial_backtrace_object(const rb_execution_context_t *ec, long start_fram
590590
ptrdiff_t size;
591591
rb_backtrace_t *bt;
592592
VALUE btobj = backtrace_alloc(rb_cBacktrace);
593-
rb_backtrace_location_t *loc;
593+
rb_backtrace_location_t *loc = NULL;
594594
unsigned long cfunc_counter = 0;
595595
GetCoreDataFromValue(btobj, rb_backtrace_t, bt);
596596

0 commit comments

Comments
 (0)