From f8902c34862c0194935cc6178ed3eb8214b65786 Mon Sep 17 00:00:00 2001 From: Anush Nadathur Date: Tue, 18 Jun 2024 13:01:17 -0700 Subject: [PATCH] Fixed build failure when tracing is off --- src/protocols/secure_channel/CASESession.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index e6ed3eb80d1b70..4de902b3f6ab37 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -2381,9 +2381,10 @@ CHIP_ERROR CASESession::OnMessageReceived(ExchangeContext * ec, const PayloadHea if (msgType == Protocols::SecureChannel::MsgType::StatusReport) { // Need to capture before invoking status report since 'this' might be deallocated on successful completion of sigma3 - auto key = (mState == State::kSentSigma3) ? kMetricDeviceCASESessionSigma3 : kMetricDeviceCASESessionSigma2Resume; + MetricKey key = (mState == State::kSentSigma3) ? kMetricDeviceCASESessionSigma3 : kMetricDeviceCASESessionSigma2Resume; err = HandleStatusReport(std::move(msg), /* successExpected*/ true); MATTER_LOG_METRIC_END(key, err); + IgnoreUnusedVariable(key); } break; default: