Silence more Clang warnings

This commit is contained in:
twinaphex 2016-10-19 18:27:32 +02:00 committed by zeromus
parent 559b4ad077
commit 1394197244
3 changed files with 31 additions and 38 deletions

View File

@ -98,7 +98,7 @@ void CHEATS::ARparser(CHEATS_LIST& list)
if (if_flag > 0)
{
if ((type == 0x0E)) i += ((lo + 7) / 8);
if (type == 0x0E) i += ((lo + 7) / 8);
if ( (type == 0x0D) && (subtype == 0)) if_flag--; // ENDIF
if ( (type == 0x0D) && (subtype == 2)) // NEXT & Flush
{

View File

@ -162,17 +162,16 @@ bool BackupDevice::load_state(EMUFILE* is)
std::vector<u8> data;
if(read32le(&version,is)!=1) return false;
if(version>=0)
{
readbool(&write_enable,is);
read32le(&com,is);
read32le(&addr_size,is);
read32le(&addr_counter,is);
read32le(&temp,is);
state = (STATE)temp;
readbuffer(data,is);
readbuffer(data_autodetect,is);
}
readbool(&write_enable,is);
read32le(&com,is);
read32le(&addr_size,is);
read32le(&addr_counter,is);
read32le(&temp,is);
state = (STATE)temp;
readbuffer(data,is);
readbuffer(data_autodetect,is);
if(version>=1)
read32le(&addr,is);

View File

@ -412,21 +412,18 @@ static bool s_slot1_loadstate(EMUFILE* is, int size)
{
u32 version = is->read32le();
//version 0:
if(version >= 0)
{
u8 slotID = is->read32le();
slot1Type = NDS_SLOT1_RETAIL_AUTO;
if (version >= 1)
slot1_getTypeByID(slotID, slot1Type);
/* version 0: */
u8 slotID = is->read32le();
slot1Type = NDS_SLOT1_RETAIL_AUTO;
if (version >= 1)
slot1_getTypeByID(slotID, slot1Type);
slot1_Change(slot1Type);
slot1_Change(slot1Type);
EMUFILE_MEMORY temp;
is->readMemoryStream(&temp);
temp.fseek(0,SEEK_SET);
slot1_Loadstate(&temp);
}
EMUFILE_MEMORY temp;
is->readMemoryStream(&temp);
temp.fseek(0,SEEK_SET);
slot1_Loadstate(&temp);
return true;
}
@ -448,20 +445,17 @@ static bool s_slot2_loadstate(EMUFILE* is, int size)
{
u32 version = is->read32le();
//version 0:
if(version >= 0)
{
slot2Type = NDS_SLOT2_AUTO;
u8 slotID = is->read32le();
if (version == 0)
slot2_getTypeByID(slotID, slot2Type);
slot2_Change(slot2Type);
/* version 0: */
slot2Type = NDS_SLOT2_AUTO;
u8 slotID = is->read32le();
if (version == 0)
slot2_getTypeByID(slotID, slot2Type);
slot2_Change(slot2Type);
EMUFILE_MEMORY temp;
is->readMemoryStream(&temp);
temp.fseek(0,SEEK_SET);
slot2_Loadstate(&temp);
}
EMUFILE_MEMORY temp;
is->readMemoryStream(&temp);
temp.fseek(0,SEEK_SET);
slot2_Loadstate(&temp);
return true;
}