Skip to content

Commit

Permalink
limit dangling-pointer suppression to gcc >= 12
Browse files Browse the repository at this point in the history
Summary: The warning is introduced with gcc-12. The compiler may fail the compile at a warning suppression for a warning not understood by the compiler, depending on options passed or not passed.

Reviewed By: shaitan

Differential Revision: D52599246

fbshipit-source-id: f6e4d56f13ac8629df07e80579c66fee580e78bd
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Jan 8, 2024
1 parent f601d24 commit 3cfe240
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions folly/io/async/HHWheelTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ void HHWheelTimerBase<Duration>::timeoutExpired() noexcept {
// to treat these calls slightly differently.
CHECK(!processingCallbacksGuard_);
FOLLY_PUSH_WARNING
#if __GNUC__ >= 12
FOLLY_GCC_DISABLE_WARNING("-Wdangling-pointer")
#endif
processingCallbacksGuard_ = &isDestroyed;
FOLLY_POP_WARNING
auto reEntryGuard = folly::makeGuard([&] {
Expand Down

0 comments on commit 3cfe240

Please sign in to comment.