Skip to content

Commit

Permalink
Remove write-only variables. (#23860)
Browse files Browse the repository at this point in the history
This is triggering errors due to -Werror on some compilers.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Apr 4, 2023
1 parent e1bd3ec commit 09bbc3a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
5 changes: 1 addition & 4 deletions src/app/MessageDef/AttributeStatusIBs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ AttributeStatusIBs::Builder & AttributeStatusIBs::Builder::EndOfAttributeStatuse
#if CHIP_CONFIG_IM_PRETTY_PRINT
CHIP_ERROR AttributeStatusIBs::Parser::PrettyPrint() const
{
CHIP_ERROR err = CHIP_NO_ERROR;
size_t NumAttributeStatus = 0;
CHIP_ERROR err = CHIP_NO_ERROR;
TLV::TLVReader reader;

PRETTY_PRINT("AttributeStatusIBs =");
Expand All @@ -68,8 +67,6 @@ CHIP_ERROR AttributeStatusIBs::Parser::PrettyPrint() const
ReturnErrorOnFailure(status.PrettyPrint());
PRETTY_PRINT_DECDEPTH();
}

++NumAttributeStatus;
}

PRETTY_PRINT("],");
Expand Down
3 changes: 0 additions & 3 deletions src/app/MessageDef/EventPathIBs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace app {
CHIP_ERROR EventPathIBs::Parser::PrettyPrint() const
{
CHIP_ERROR err = CHIP_NO_ERROR;
size_t NumPath = 0;
TLV::TLVReader reader;

PRETTY_PRINT("EventPathIBs =");
Expand All @@ -54,8 +53,6 @@ CHIP_ERROR EventPathIBs::Parser::PrettyPrint() const
ReturnErrorOnFailure(path.PrettyPrint());
PRETTY_PRINT_DECDEPTH();
}

++NumPath;
}

PRETTY_PRINT("],");
Expand Down
3 changes: 0 additions & 3 deletions src/app/clusters/groups-server/groups-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ struct GroupMembershipResponse
{
GroupDataProvider::GroupEndpoint mapping;
size_t requestedCount = 0;
size_t matchCount = 0;
ReturnErrorOnFailure(mCommandData.groupList.ComputeSize(&requestedCount));

if (0 == requestedCount)
Expand All @@ -223,7 +222,6 @@ struct GroupMembershipResponse
if (mapping.endpoint_id == mEndpoint)
{
ReturnErrorOnFailure(app::DataModel::Encode(writer, TLV::AnonymousTag(), mapping.group_id));
matchCount++;
ChipLogDetail(Zcl, " 0x%02x", mapping.group_id);
}
}
Expand All @@ -238,7 +236,6 @@ struct GroupMembershipResponse
if (mapping.endpoint_id == mEndpoint && mapping.group_id == iter.GetValue())
{
ReturnErrorOnFailure(app::DataModel::Encode(writer, TLV::AnonymousTag(), mapping.group_id));
matchCount++;
ChipLogDetail(Zcl, " 0x%02x", mapping.group_id);
break;
}
Expand Down

0 comments on commit 09bbc3a

Please sign in to comment.