Skip to content

Commit 87c7070

Browse files
committed
QSPIFlashBlockDevice: fix signed/unsigned comparison
1 parent de06a61 commit 87c7070

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/BlockDevices/QSPIFlashBlockDevice.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ int QSPIFlashBlockDevice::erase(bd_addr_t add, bd_size_t _size) {
328328

329329
uint32_t num_of_blocks = (_size / erase_block_size);
330330

331-
for(int i = 0; i < num_of_blocks && rv == FSP_SUCCESS; i++) {
331+
for(uint32_t i = 0; i < num_of_blocks && rv == FSP_SUCCESS; i++) {
332332
/* set bank */
333333
uint32_t bank = add / READ_PAGE_SIZE;
334334
uint32_t address = base_address + ((add + i * erase_block_size) % READ_PAGE_SIZE);

0 commit comments

Comments
 (0)