Skip to content

Commit

Permalink
Remove write-only variables.
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 committed Dec 1, 2022
1 parent 53e51d8 commit 992a0f6
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 992a0f6

Please sign in to comment.