Skip to content

Commit 575a440

Browse files
authored
Silence CodeQL warning related to comparing uint8_t for loop index with a size_t pathsConfig.count (project-chip#37173)
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 47a95b9 commit 575a440

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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;

0 commit comments

Comments
 (0)