Resolved a few more cppcheck/compiler warnings in core input module.

This commit is contained in:
Matthew Budd 2020-06-15 22:53:45 -04:00
parent e6329b911a
commit ad69657d02
3 changed files with 10 additions and 7 deletions

View File

@ -42,7 +42,7 @@ struct FCEUFILE {
FCEUFILE()
: stream(0)
, archiveCount(-1)
, archiveCount(-1), archiveIndex(0), size(0), mode(READ)
{}
~FCEUFILE()

View File

@ -484,6 +484,7 @@ static void SetInputStuff(int port)
joyports[port].driver=FCEU_InitVirtualBoy(port);
break;
case SI_NONE:
case SI_UNSET:
joyports[port].driver=&DummyJPort;
break;
}
@ -494,6 +495,7 @@ static void SetInputStuffFC()
switch(portFC.type)
{
case SIFC_NONE:
case SIFC_UNSET:
portFC.driver=&DummyPortFC;
break;
case SIFC_ARKANOID:
@ -721,7 +723,7 @@ const char* FCEUI_CommandTypeNames[]=
"TAS Editor",
};
static void CommandUnImpl(void);
//static void CommandUnImpl(void);
static void CommandToggleDip(void);
static void CommandStateLoad(void);
static void CommandStateSave(void);
@ -938,10 +940,11 @@ void FCEUI_HandleEmuCommands(TestCommandState* testfn)
}
}
static void CommandUnImpl(void)
{
FCEU_DispMessage("command '%s' unimplemented.",0, FCEUI_CommandTable[i].name);
}
// Function not currently used
//static void CommandUnImpl(void)
//{
// FCEU_DispMessage("command '%s' unimplemented.",0, FCEUI_CommandTable[i].name);
//}
static void CommandToggleDip(void)
{

View File

@ -74,7 +74,7 @@ struct INPUTCFC
extern struct JOYPORT
{
JOYPORT(int _w)
: w(_w)
: w(_w), attrib(0), type(SI_UNSET), ptr(0), driver(0)
{}
int w;