fix(telemetry): fix Clang unused-variable and incomplete-type errors

- Add [[maybe_unused]] to RAII spans in TxQ.cpp
- Include Telemetry.h in RCLConsensus.cpp for complete type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-04-29 17:31:23 +01:00
parent 17e69e660c
commit dbcd040180
2 changed files with 3 additions and 2 deletions

View File

@@ -63,6 +63,7 @@
#include <xrpl/shamap/SHAMapItem.h>
#include <xrpl/shamap/SHAMapMissingNode.h>
#include <xrpl/shamap/SHAMapTreeNode.h>
#include <xrpl/telemetry/Telemetry.h>
#include <xrpl/telemetry/TraceContextPropagator.h>
#include <boost/smart_ptr/intrusive_ptr.hpp>

View File

@@ -532,7 +532,7 @@ TxQ::tryClearAccountQueueUpThruTx(
beast::Journal j)
{
using namespace telemetry;
auto span = SpanGuard::span(
[[maybe_unused]] auto span = SpanGuard::span(
TraceCategory::Transactions, txq_span::prefix::txq, txq_span::op::batchClear);
SeqProxy const tSeqProx{tx.getSeqProxy()};
@@ -1681,7 +1681,7 @@ TxQ::tryDirectApply(
beast::Journal j)
{
using namespace telemetry;
auto span = SpanGuard::span(
[[maybe_unused]] auto span = SpanGuard::span(
TraceCategory::Transactions, txq_span::prefix::txq, txq_span::op::applyDirect);
auto const account = (*tx)[sfAccount];