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 4f07e78134
commit 7dc71fec94
1 changed files with 5 additions and 0 deletions

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" },