Temporarily work around gcc-13 warning bug in interfaces_tests

This can be reverted once gcc excludes lambdas with decltype(auto)
return type from its -Wdangling-reference analysis.
This commit is contained in:
MarcoFalke 2023-05-09 20:27:03 +02:00
parent fa28850562
commit fa266c4bbf
No known key found for this signature in database

View file

@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE(findAncestorByHash)
BOOST_AUTO_TEST_CASE(findCommonAncestor)
{
auto& chain = m_node.chain;
const CChain& active = WITH_LOCK(Assert(m_node.chainman)->GetMutex(), return Assert(m_node.chainman)->ActiveChain());
const CChain& active{*WITH_LOCK(Assert(m_node.chainman)->GetMutex(), return &Assert(m_node.chainman)->ActiveChain())};
auto* orig_tip = active.Tip();
for (int i = 0; i < 10; ++i) {
BlockValidationState state;