Skip to content

Commit

Permalink
Fix regression
Browse files Browse the repository at this point in the history
Found by iceman1001's code review ... THANK YOU!
  • Loading branch information
henrygab committed Jan 15, 2025
1 parent 6613ff7 commit dc0e6f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion armsrc/spiffs_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ static s32_t spiffs_page_consistency_check_i(spiffs *fs) {
0);
// traverse each page except for lookup pages
spiffs_page_ix cur_pix = SPIFFS_OBJ_LOOKUP_PAGES(fs) + SPIFFS_PAGES_PER_BLOCK(fs) * cur_block;
while (!restart && cur_pix < total_blocks_plus_one_page) {
while (!restart && cur_pix < SPIFFS_PAGES_PER_BLOCK(fs) * (cur_block+1)) {

Check failure

Code scanning / CodeQL

Comparison of narrow type with wide type in loop condition High

Comparison between
cur_pix
of type spiffs_page_ix and
... * ...
of wider type int.
//if ((cur_pix & 0xff) == 0)
// SPIFFS_CHECK_DBG("PA: processing pix "_SPIPRIpg", block "_SPIPRIbl" of pix "_SPIPRIpg", block "_SPIPRIbl"\n",
// cur_pix, cur_block, total_blocks, block_count);
Expand Down

0 comments on commit dc0e6f4

Please sign in to comment.