Skip to content

Commit

Permalink
Silence CodeQL warning related to comparing uint8_t for loop index wi…
Browse files Browse the repository at this point in the history
…th a size_t pathsConfig.count (#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
  • Loading branch information
Alami-Amine authored Jan 23, 2025
1 parent 47a95b9 commit 575a440
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class InteractionModelWriter
mTimedInteractionTimeoutMs, mSuppressResponse.ValueOr(false));
VerifyOrReturnError(mWriteClient != nullptr, CHIP_ERROR_NO_MEMORY);

for (uint8_t i = 0; i < pathsConfig.count; i++)
for (size_t i = 0; i < pathsConfig.count; i++)
{
auto & path = pathsConfig.attributePathParams[i];
auto & dataVersion = pathsConfig.dataVersionFilter[i].mDataVersion;
Expand Down

0 comments on commit 575a440

Please sign in to comment.