Cppcheck warning fixes for Qt GUI.

This commit is contained in:
mjbudd77 2020-08-21 11:55:19 -04:00
parent b614edee75
commit b37e1e03f0
2 changed files with 3 additions and 2 deletions

View File

@ -104,7 +104,8 @@ void FCEUD_PrintError(const char *errormsg)
*/
FILE *FCEUD_UTF8fopen(const char *fn, const char *mode)
{
return(fopen(fn,mode));
FILE *fp = ::fopen(fn,mode);
return(fp);
}
/**

View File

@ -1570,6 +1570,7 @@ const char * ButtonName (const ButtConfig * bc)
{
int joyNum, inputNum;
const char *inputType, *inputDirection;
char direction[128] = "";
joyNum = bc->DeviceNum;
@ -1582,7 +1583,6 @@ const char * ButtonName (const ButtConfig * bc)
else if (bc->ButtonNum & 0x2000)
{
int inputValue;
char direction[128] = "";
inputType = "Hat";
inputNum = (bc->ButtonNum >> 8) & 0x1F;