diff --git a/src/tests/libxrpl/telemetry/TxAccountSpanNames.cpp b/src/tests/libxrpl/telemetry/TxAccountSpanNames.cpp index 0b51776647..7bfc6bab81 100644 --- a/src/tests/libxrpl/telemetry/TxAccountSpanNames.cpp +++ b/src/tests/libxrpl/telemetry/TxAccountSpanNames.cpp @@ -85,8 +85,12 @@ TEST(TxAccountSpanNames, account_fields_no_transaction_carries_have_no_key) for (auto const* field : all) { + // Braced on purpose: EXPECT_EQ expands to an if/else, so an unbraced + // if around it is a dangling-else error with warnings as errors. if (!carried.contains(field)) + { EXPECT_EQ(accountFieldAttributeKey(*field), std::nullopt) << field->getName(); + } } }