mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Ignore -Wdangling-pointer in rb_gc_set_stack_end
Fixes this compiler warning: thread.c:4530:18: warning: storing the address of local variable ‘stack_end’ in ‘*stack_end_p’ [-Wdangling-pointer=] 4530 | *stack_end_p = &stack_end; | ~~~~~~~~~~~~~^~~~~~~~~~~~
This commit is contained in:
parent
f0dcbbe9b9
commit
c996f4091f
1 changed files with 5 additions and 0 deletions
5
thread.c
5
thread.c
|
@ -4527,7 +4527,12 @@ void
|
|||
rb_gc_set_stack_end(VALUE **stack_end_p)
|
||||
{
|
||||
VALUE stack_end;
|
||||
COMPILER_WARNING_PUSH
|
||||
#if __has_warning("-Wdangling-pointer")
|
||||
COMPILER_WARNING_IGNORED(-Wdangling-pointer);
|
||||
#endif
|
||||
*stack_end_p = &stack_end;
|
||||
COMPILER_WARNING_POP
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue