Suppress harmless -Wmissing-fields-initialize in wxSecretStore

This warning is difficult to avoid as we don't want to initialize the
unused/reserved fields of SecretSchema struct, yet the compiler warns
about it (when using -Wextra).
This commit is contained in:
Vadim Zeitlin 2017-11-12 16:57:40 +01:00
parent edf0db1eb3
commit a03441f959

View File

@ -235,6 +235,11 @@ private:
// helper function to make changing the code later simpler.
static SecretSchema* GetSchema()
{
// SecretSchema struct has some "reserved" fields in it which we don't
// want to initialize, but this results in this warning if it's
// enabled, so just suppress it here.
wxGCC_WARNING_SUPPRESS(missing-field-initializers)
static SecretSchema s_schema =
{
"org.freedesktop.Secret.Generic",
@ -246,6 +251,8 @@ private:
}
};
wxGCC_WARNING_RESTORE(missing-field-initializers)
return &s_schema;
}