Skip to content

Commit

Permalink
silenced spurious GCC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquintides committed Aug 7, 2024
1 parent d3c1a32 commit d14112b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unordered/node_handle_allocator_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ namespace {
boost::allocator_rebind_t<Allocator, std::pair<K const, T> > >;
};

#if BOOST_WORKAROUND(BOOST_GCC, < 130000)
// maybe related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108230
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

template<typename X, typename Allocator>
void node_handle_allocator_tests(
X*, std::pair<Allocator, Allocator> allocators)
Expand Down Expand Up @@ -157,6 +163,10 @@ namespace {
BOOST_TEST(nh2.get_allocator() == x2.get_allocator());
}

#if BOOST_WORKAROUND(BOOST_GCC, < 130000)
#pragma GCC diagnostic pop // -Wmaybe-uninitialized
#endif

#if BOOST_WORKAROUND(BOOST_MSVC, <= 1900)
#pragma warning(push)
#pragma warning(disable : 4592) // symbol will be dynamically initialized
Expand Down

0 comments on commit d14112b

Please sign in to comment.