From 06db0173dbe00a0ceffe199078e4462c348643ce Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Thu, 17 Sep 2026 13:45:18 +0100 Subject: [PATCH] fix(nodestore): mark the rewritten RotationPhase members maybe_unused This branch replaced the char const* stage with an owned string and added cache_. All three members are read only inside the metric macro, so the telemetry-off build needs the attribute here as well. Without it the merge from pratik/otel-sync-diagnostics keeps this side of the rewritten lines and drops the fix. --- src/xrpld/app/misc/SHAMapStoreImp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xrpld/app/misc/SHAMapStoreImp.h b/src/xrpld/app/misc/SHAMapStoreImp.h index 4d9abddcd1..f9a232719d 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.h +++ b/src/xrpld/app/misc/SHAMapStoreImp.h @@ -263,13 +263,15 @@ private: } private: - SHAMapStoreImp& owner_; + // The three below are read only inside the metric macro in the + // destructor, so a -DXRPL_ENABLE_TELEMETRY=0 build sees no use at all. + [[maybe_unused]] SHAMapStoreImp& owner_; // Owned copies: the constructor takes views so callers can pass the // label constants, but a view stored in a member would only be valid // as long as the caller's text was. A phase is built a handful of // times per rotation, so two small strings cost nothing. - std::string const stage_; - std::string const cache_; + [[maybe_unused]] std::string const stage_; + [[maybe_unused]] std::string const cache_; std::chrono::steady_clock::time_point start_ = std::chrono::steady_clock::now(); telemetry::ScopedSpanGuard span_; };