Skip to content

Commit fa266c4

Browse files
author
MarcoFalke
committed
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.
1 parent fa28850 commit fa266c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/interfaces_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE(findAncestorByHash)
9898
BOOST_AUTO_TEST_CASE(findCommonAncestor)
9999
{
100100
auto& chain = m_node.chain;
101-
const CChain& active = WITH_LOCK(Assert(m_node.chainman)->GetMutex(), return Assert(m_node.chainman)->ActiveChain());
101+
const CChain& active{*WITH_LOCK(Assert(m_node.chainman)->GetMutex(), return &Assert(m_node.chainman)->ActiveChain())};
102102
auto* orig_tip = active.Tip();
103103
for (int i = 0; i < 10; ++i) {
104104
BlockValidationState state;

0 commit comments

Comments
 (0)