Skip to content

Commit 69a07e8

Browse files
committed
Added [[mayne_unused]]
1 parent 806d22f commit 69a07e8

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

examples/light-switch-app/silabs/src/ZclCallbacks.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@
3030
using namespace ::chip;
3131
using namespace ::chip::app::Clusters;
3232

33-
#ifndef NDEBUG
3433
void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size,
3534
uint8_t * value)
3635
{
37-
ClusterId clusterId = attributePath.mClusterId;
38-
AttributeId attributeId = attributePath.mAttributeId;
36+
ClusterId clusterId = attributePath.mClusterId;
37+
[[maybe_unused]] AttributeId attributeId = attributePath.mAttributeId;
3938
ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId));
4039

4140
if (clusterId == OnOffSwitchConfiguration::Id)
@@ -51,7 +50,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
5150
ChipLogValueMEI(attributeId), type, *value, size);
5251
}
5352
}
54-
#endif
5553

5654
/** @brief OnOff Cluster Init
5755
*

examples/lock-app/silabs/src/ZclCallbacks.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ using namespace ::chip::app::Clusters;
3939
using namespace ::chip::DeviceLayer::Internal;
4040
using ::chip::app::DataModel::Nullable;
4141

42-
#ifndef NDEBUG
4342
void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size,
4443
uint8_t * value)
4544
{
@@ -49,15 +48,14 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
4948

5049
if (clusterId == DoorLock::Id && attributeId == DoorLock::Attributes::LockState::Id)
5150
{
52-
DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
51+
[[maybe_unused]] DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
5352
ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId),
5453
to_underlying(lockState));
5554
#ifdef DIC_ENABLE
5655
dic_sendmsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock"));
5756
#endif // DIC_ENABLE
5857
}
5958
}
60-
#endif // NDEBUG
6159

6260
/** @brief DoorLock Cluster Init
6361
*

0 commit comments

Comments
 (0)