Skip to content

Commit 7928a0f

Browse files
committed
Silence CodeQL warning related to comparing uint8_t for loop index with a size_t pathsConfig.count
in reality pathsConfig.count will never exceed 255 but since this is TestCode simplest is to make the loop condition index a size_t
1 parent c29c15c commit 7928a0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/tests/suites/commands/interaction_model/InteractionModel.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ class InteractionModelWriter
407407
mTimedInteractionTimeoutMs, mSuppressResponse.ValueOr(false));
408408
VerifyOrReturnError(mWriteClient != nullptr, CHIP_ERROR_NO_MEMORY);
409409

410-
for (uint8_t i = 0; i < pathsConfig.count; i++)
410+
for (size_t i = 0; i < pathsConfig.count; i++)
411411
{
412412
auto & path = pathsConfig.attributePathParams[i];
413413
auto & dataVersion = pathsConfig.dataVersionFilter[i].mDataVersion;
@@ -592,8 +592,8 @@ class InteractionModel : public InteractionModelReports,
592592
public chip::app::CommandSender::Callback
593593
{
594594
public:
595-
InteractionModel() : InteractionModelReports(this), InteractionModelCommands(this), InteractionModelWriter(this){};
596-
virtual ~InteractionModel(){};
595+
InteractionModel() : InteractionModelReports(this), InteractionModelCommands(this), InteractionModelWriter(this) {};
596+
virtual ~InteractionModel() {};
597597

598598
virtual void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) = 0;
599599
virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0;

0 commit comments

Comments
 (0)