Code was previously performing arithmetic in
various loop check conditions. Integer promotion rules could cause unintended comparisons.
`spiffs` defined `fs->block_count` as `uint32_t`, but defined `spiffs_page_ix` as `uint16_t`. Various overflow checks detected by CodeQL and fixed by checking for those conditions before looping.