From 141f0cb0e452293bc1df91a780e34d0b92bc34c1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 12 Dec 2018 23:45:09 +0100 Subject: [PATCH] Suppress harmless gcc missing initializers warnings in a test Suppressing the warnings is ugly but less ugly than explicitly specifying all the omitted elements in the array. --- tests/sizers/boxsizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sizers/boxsizer.cpp b/tests/sizers/boxsizer.cpp index 77c33cc9fb..2033e1f344 100644 --- a/tests/sizers/boxsizer.cpp +++ b/tests/sizers/boxsizer.cpp @@ -130,6 +130,8 @@ void BoxSizerTestCase::Size1() void BoxSizerTestCase::Size3() { + wxGCC_WARNING_SUPPRESS(missing-field-initializers) + // check that various combinations of minimal sizes and proportions work as // expected for different window sizes static const struct LayoutTestData @@ -189,6 +191,8 @@ void BoxSizerTestCase::Size3() { { 1, 2, 3, }, { 100, 100, 100, }, 0, { 0, 0, 0, }, true }, }; + wxGCC_WARNING_RESTORE(missing-field-initializers) + wxWindow *child[3]; child[0] = new wxWindow(m_win, wxID_ANY); child[1] = new wxWindow(m_win, wxID_ANY);