Fix warnings in gcc and clang for missing initializers.

Normally I would disable the warning completely (everywhere), but it's very useful to have.
In this case, the code can be much faster, as it saves having to initialize empty string objects.  So we disable the warning selectively.
This commit is contained in:
Stephen Anthony 2022-07-01 10:05:35 -02:30
parent a5d79817ef
commit 5b3c4eb2d1
1 changed files with 5 additions and 0 deletions
src/emucore

View File

@ -2784,6 +2784,11 @@ void EventHandler::exitEmulation(bool checkLauncher)
}
}
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#elif defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
{ Event::Quit, "Quit" },