diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-10-05 13:58:34 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-10-07 09:39:07 -0400 |
| commit | 216d087f50de719d551592e589f7ecece00570da (patch) | |
| tree | 62974de732fffd055b677944d197895cabd9c602 | |
| parent | 9ee0e1127481021562a03c43b20c6e3af7c5f2f5 (diff) | |
Disable -Wunused-function for shared GC in gc/gc.h
Shared GC might not use the private functions in gc/gc.h, so they will
show up as warnings for unused functions. This commit disables
-Wunused-function for these functions when building as shared GC.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11808
| -rw-r--r-- | gc/gc.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -49,6 +49,11 @@ void rb_ractor_finish_marking(void); // -------------------Private section begin------------------------ // Functions in this section are private to the default GC and gc.c +#ifdef BUILDING_SHARED_GC +RBIMPL_WARNING_PUSH() +RBIMPL_WARNING_IGNORED(-Wunused-function) +#endif + /* RGENGC_CHECK_MODE * 0: disable all assertions * 1: enable assertions (to debug RGenGC) @@ -180,6 +185,10 @@ type_sym(size_t type) default: return SIZET2NUM(type); break; } } + +#ifdef BUILDING_SHARED_GC +RBIMPL_WARNING_POP() +#endif // -------------------Private section end------------------------ #endif |
