Suppress all -Wmissing-field-initializers in the test suite

There were many dozens of such warnings given for the various arrays
used in the tests and it just doesn't seem feasible nor desirable to fix
them all, so just suppress the warnings for all these arrays to get rid
of them with recent (7+?) versions of gcc.
This commit is contained in:
Vadim Zeitlin
2019-02-02 17:25:37 +01:00
parent 9a7a89b7b2
commit 2a907769fb
3 changed files with 40 additions and 0 deletions

View File

@@ -299,6 +299,8 @@ void CmdLineTestCase::ArgumentsCollection()
void CmdLineTestCase::Usage()
{
wxGCC_WARNING_SUPPRESS(missing-field-initializers)
// check that Usage() returns roughly what we expect (don't check all the
// details, its format can change in the future)
static const wxCmdLineEntryDesc desc[] =
@@ -319,6 +321,8 @@ void CmdLineTestCase::Usage()
{ wxCMD_LINE_NONE }
};
wxGCC_WARNING_RESTORE(missing-field-initializers)
wxCmdLineParser p(desc);
const wxArrayString usageLines = wxSplit(p.GetUsageString(), '\n');
@@ -348,6 +352,8 @@ void CmdLineTestCase::Usage()
void CmdLineTestCase::Found()
{
wxGCC_WARNING_SUPPRESS(missing-field-initializers)
static const wxCmdLineEntryDesc desc[] =
{
{ wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" },
@@ -359,6 +365,8 @@ void CmdLineTestCase::Found()
{ wxCMD_LINE_NONE }
};
wxGCC_WARNING_RESTORE(missing-field-initializers)
wxCmdLineParser p(desc);
p.SetCmdLine ("-v --output hello -s 2 --date=2014-02-17 -f 0.2 input-file.txt");