[Silabs] Added [[maybe_unused]] to remove errors from NDEBUG builds (#33315)
* Added NDEBUG ifndef to minimize code size
* Restyled by whitespace
* Restyled by clang-format
* Added #endif
* Added [[mayne_unused]]
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/examples/light-switch-app/silabs/src/ZclCallbacks.cpp b/examples/light-switch-app/silabs/src/ZclCallbacks.cpp
index 52542ca..1337553 100644
--- a/examples/light-switch-app/silabs/src/ZclCallbacks.cpp
+++ b/examples/light-switch-app/silabs/src/ZclCallbacks.cpp
@@ -33,8 +33,8 @@
void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size,
uint8_t * value)
{
- ClusterId clusterId = attributePath.mClusterId;
- AttributeId attributeId = attributePath.mAttributeId;
+ ClusterId clusterId = attributePath.mClusterId;
+ [[maybe_unused]] AttributeId attributeId = attributePath.mAttributeId;
ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId));
if (clusterId == OnOffSwitchConfiguration::Id)
diff --git a/examples/lock-app/silabs/src/ZclCallbacks.cpp b/examples/lock-app/silabs/src/ZclCallbacks.cpp
index 1c0c1ef..2aa0e9d 100644
--- a/examples/lock-app/silabs/src/ZclCallbacks.cpp
+++ b/examples/lock-app/silabs/src/ZclCallbacks.cpp
@@ -48,7 +48,7 @@
if (clusterId == DoorLock::Id && attributeId == DoorLock::Attributes::LockState::Id)
{
- DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
+ [[maybe_unused]] DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId),
to_underlying(lockState));
#ifdef DIC_ENABLE