From 2b4977635ce6f9a363b8b605b2632bb6ac74bbe7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 14 Nov 2022 09:37:18 +0000 Subject: [PATCH] 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 --- gthread/tests/init.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gthread/tests/init.c b/gthread/tests/init.c index 79f68f050..82aac5475 100644 --- a/gthread/tests/init.c +++ b/gthread/tests/init.c @@ -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);