make gcc 8 happy
This commit is contained in:
parent
64620c34bf
commit
763374af91
|
@ -150,6 +150,12 @@ static int DisplayHistory()
|
|||
return 0;
|
||||
}
|
||||
|
||||
// make gcc 8.x happy about sprintf() usage below...
|
||||
#if __GNUC__ == 8
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow="
|
||||
#endif
|
||||
|
||||
static int GameInfoInit()
|
||||
{
|
||||
// Get the games full name
|
||||
|
@ -623,6 +629,16 @@ static int GameInfoInit()
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if __GNUC__ == 8
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
// make gcc 8.x happy about strncpy() usage below...
|
||||
#if __GNUC__ == 8
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
#endif
|
||||
|
||||
#define MAXFAVORITES 2000
|
||||
char szFavorites[MAXFAVORITES][28];
|
||||
INT32 nFavorites = 0;
|
||||
|
@ -718,6 +734,10 @@ void AddFavorite_Ext(UINT8 addf)
|
|||
AddFavorite(addf);
|
||||
}
|
||||
|
||||
#if __GNUC__ == 8
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static void MyEndDialog()
|
||||
{
|
||||
SendDlgItemMessage(hGameInfoDlg, IDC_SCREENSHOT_H, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)NULL);
|
||||
|
|
|
@ -793,7 +793,7 @@ static void DoPatchGame(const char* patch_name, char* game_name, UINT8* base)
|
|||
// skip CRC check
|
||||
strtok(NULL, "\r\n");
|
||||
|
||||
char ips_path[MAX_PATH];
|
||||
char ips_path[MAX_PATH*2];
|
||||
char ips_dir[MAX_PATH];
|
||||
TCHARToANSI(szAppIpsPath, ips_dir, sizeof(ips_dir));
|
||||
|
||||
|
|
|
@ -441,7 +441,11 @@ int OpenDebugLog()
|
|||
AllocConsole();
|
||||
}
|
||||
#else
|
||||
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
|
||||
|
||||
#ifdef ATTACH_PARENT_PROCESS
|
||||
#undef ATTACH_PARENT_PROCESS
|
||||
#endif
|
||||
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
|
||||
|
||||
BOOL (WINAPI* pAttachConsole)(DWORD dwProcessId) = NULL;
|
||||
HINSTANCE hKernel32DLL = LoadLibrary(_T("kernel32.dll"));
|
||||
|
|
Loading…
Reference in New Issue