Avoid another -Wmaybe-uninitialized under GCC 11/12

This commit is contained in:
Peter Dimov
2023-02-12 04:47:38 +02:00
parent e9f1036927
commit 9229ed3010

View File

@ -501,8 +501,16 @@ namespace boost {
void clear(function_buffer& functor) const
{
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
# pragma GCC diagnostic push
// False positive in GCC 11/12 for empty function objects
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
if (base.manager)
base.manager(functor, functor, destroy_functor_tag);
#if defined(BOOST_GCC) && (__GNUC__ >= 11)
# pragma GCC diagnostic pop
#endif
}
private: