gthread: Fully initialize GThreadFunctions structure in test

The macOS CI builds with -Werror=missing-field-initializers by default,
making incomplete initializers a compile-time error (even though their
meaning is well-defined: missing fields are initialized as if with
.field = 0).

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2812
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-11-14 09:37:18 +00:00
parent f64f88baae
commit 2b4977635c

View File

@ -30,7 +30,14 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void
test_thread_deprecated_init (void)
{
const GThreadFunctions functions = { NULL, };
const GThreadFunctions functions = {
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL
};
/* Should be a no-op. */
g_thread_init (NULL);