Skip to content

Commit d75f73c

Browse files
[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>
1 parent 457c600 commit d75f73c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ using namespace ::chip::app::Clusters;
3333
void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size,
3434
uint8_t * value)
3535
{
36-
ClusterId clusterId = attributePath.mClusterId;
37-
AttributeId attributeId = attributePath.mAttributeId;
36+
ClusterId clusterId = attributePath.mClusterId;
37+
[[maybe_unused]] AttributeId attributeId = attributePath.mAttributeId;
3838
ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId));
3939

4040
if (clusterId == OnOffSwitchConfiguration::Id)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
4848

4949
if (clusterId == DoorLock::Id && attributeId == DoorLock::Attributes::LockState::Id)
5050
{
51-
DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
51+
[[maybe_unused]] DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
5252
ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId),
5353
to_underlying(lockState));
5454
#ifdef DIC_ENABLE

0 commit comments

Comments
 (0)