Skip to content

Commit

Permalink
[Silabs] Added [[maybe_unused]] to remove errors from NDEBUG builds (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed May 14, 2024
1 parent 7d5374c commit 1190434
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/light-switch-app/silabs/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ using namespace ::chip::app::Clusters;
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)
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/silabs/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &

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
Expand Down

0 comments on commit 1190434

Please sign in to comment.