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:
parent
edf0db1eb3
commit
a03441f959
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user