A few signed/unsigned int comparison mismatch compiler warning fixes.
This commit is contained in:
parent
c2dc8cd25b
commit
5582df13d7
|
@ -445,12 +445,12 @@ void CommonInit(CartInfo* info, int submapper)
|
|||
|
||||
if (flash_save) {
|
||||
CFI = (uint8*)FCEU_gmalloc(sizeof(cfi_data) * 2);
|
||||
for (int i = 0; i < sizeof(cfi_data); i++) {
|
||||
for (size_t i = 0; i < sizeof(cfi_data); i++) {
|
||||
CFI[i * 2] = CFI[i * 2 + 1] = cfi_data[i];
|
||||
}
|
||||
SetupCartPRGMapping(CFI_CHIP, CFI, sizeof(cfi_data) * 2, 0);
|
||||
Flash = (uint8*)FCEU_gmalloc(PRGsize[ROM_CHIP]);
|
||||
for (int i = 0; i < PRGsize[ROM_CHIP]; i++) {
|
||||
for (unsigned int i = 0; i < PRGsize[ROM_CHIP]; i++) {
|
||||
Flash[i] = PRGptr[ROM_CHIP][i % PRGsize[ROM_CHIP]];
|
||||
}
|
||||
SetupCartPRGMapping(FLASH_CHIP, Flash, PRGsize[ROM_CHIP], 1);
|
||||
|
|
|
@ -91,7 +91,7 @@ static DECLFW(UNROM512FlashWrite)
|
|||
(flash_buffer_v[5] == 0x30)) {
|
||||
int offset = &Page[A >> 11][A] - flash_data;
|
||||
int sector = offset / FLASH_SECTOR_SIZE;
|
||||
for (uint32 i = sector * FLASH_SECTOR_SIZE; i < (sector + 1) * FLASH_SECTOR_SIZE; i++)
|
||||
for (int i = sector * FLASH_SECTOR_SIZE; i < (sector + 1) * FLASH_SECTOR_SIZE; i++)
|
||||
flash_data[i % PRGsize[ROM_CHIP]] = 0xFF;
|
||||
FCEU_printf("Flash sector #%d is erased (0x%08x - 0x%08x).\n", sector, offset, offset + FLASH_SECTOR_SIZE);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void UNROM512_Init(CartInfo *info) {
|
|||
// Allocate memory for flash
|
||||
flash_data = (uint8*)FCEU_gmalloc(PRGsize[ROM_CHIP]);
|
||||
// Copy ROM to flash data
|
||||
for (int i = 0; i < PRGsize[ROM_CHIP]; i++) {
|
||||
for (unsigned int i = 0; i < PRGsize[ROM_CHIP]; i++) {
|
||||
flash_data[i] = PRGptr[ROM_CHIP][i % PRGsize[ROM_CHIP]];
|
||||
}
|
||||
SetupCartPRGMapping(FLASH_CHIP, flash_data, PRGsize[ROM_CHIP], 1);
|
||||
|
|
Loading…
Reference in New Issue