diff --git a/src/boards/coolgirl.cpp b/src/boards/coolgirl.cpp index 17c087d5..95dcf825 100644 --- a/src/boards/coolgirl.cpp +++ b/src/boards/coolgirl.cpp @@ -2286,7 +2286,7 @@ void COOLGIRL_Init(CartInfo *info) { } 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]; } diff --git a/src/boards/mmc5.cpp b/src/boards/mmc5.cpp index ac98d57d..35132731 100644 --- a/src/boards/mmc5.cpp +++ b/src/boards/mmc5.cpp @@ -307,8 +307,7 @@ cartdata MMC5CartList[] = #define MMC5_NOCARTS (sizeof(MMC5CartList) / sizeof(MMC5CartList[0])) int DetectMMC5WRAMSize(uint32 crc32) { - int x; - for (x = 0; x < MMC5_NOCARTS; x++) { + for (size_t x = 0; x < MMC5_NOCARTS; x++) { if (crc32 == MMC5CartList[x].crc32) { if(MMC5CartList[x].size > 1) FCEU_printf(" >8KB external WRAM present. Use UNIF if you hack the ROM image.\n"); diff --git a/src/drivers/Qt/GamePadConf.cpp b/src/drivers/Qt/GamePadConf.cpp index 278e00af..cb9ad769 100644 --- a/src/drivers/Qt/GamePadConf.cpp +++ b/src/drivers/Qt/GamePadConf.cpp @@ -604,7 +604,7 @@ void GamePadConfDialog_t::loadMapList(void) mapSel->addItem(tr("default"), 0); n = 1; - for (size_t i = 0; i < fileList.size(); i++) + for (ssize_t i = 0; i < fileList.size(); i++) { size_t suffixIdx; std::string fileName = fileList[i].toStdString(); diff --git a/src/drivers/Qt/fceuWrapper.cpp b/src/drivers/Qt/fceuWrapper.cpp index 7fe7b440..ef80bd2a 100644 --- a/src/drivers/Qt/fceuWrapper.cpp +++ b/src/drivers/Qt/fceuWrapper.cpp @@ -888,9 +888,9 @@ int fceuWrapperInit( int argc, char *argv[] ) extern std::vector subtitleMessages; float fps = (md.palFlag == 0 ? 60.0988 : 50.0069); // NTSC vs PAL float subduration = 3; // seconds for the subtitles to be displayed - for (int i = 0; i < subtitleFrames.size(); i++) + for (size_t i = 0; i < subtitleFrames.size(); i++) { - fprintf(srtfile, "%i\n", i+1); // starts with 1, not 0 + fprintf(srtfile, "%zi\n", i+1); // starts with 1, not 0 double seconds, ms, endseconds, endms; seconds = subtitleFrames[i]/fps; if (i+1 < subtitleFrames.size()) // there's another subtitle coming after this one diff --git a/src/drivers/Qt/sdl-sound.cpp b/src/drivers/Qt/sdl-sound.cpp index 14347f72..99b3b495 100644 --- a/src/drivers/Qt/sdl-sound.cpp +++ b/src/drivers/Qt/sdl-sound.cpp @@ -223,7 +223,7 @@ InitSound() i = 0; while (supportedSampleRates[i] != 0) { - if (soundrate == supportedSampleRates[i]) + if ( static_cast(soundrate) == supportedSampleRates[i]) { sampleRateIsSupported = true; break; diff --git a/src/drivers/common/configSys.cpp b/src/drivers/common/configSys.cpp index 4257df11..78048384 100644 --- a/src/drivers/common/configSys.cpp +++ b/src/drivers/common/configSys.cpp @@ -641,7 +641,7 @@ Config::_load() int Config::_loadFile(const char* fname) { - signed int pos, eqPos; + size_t pos=0, eqPos=0; std::fstream config; std::map::iterator int_i; std::map::iterator dbl_i;