From 5af3978722d388cd264b343b45c3719729367d7f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 29 Aug 2018 19:48:38 +0100 Subject: [PATCH 12/32] fixup! containers test: NameOwnerChanged is visible within a container Avoid a g_queue_foreach() idiom that gcc 8 doesn't like, similar to Bug #107349 --- test/containers.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/containers.c b/test/containers.c index 1632d111..5a484d50 100644 --- a/test/containers.c +++ b/test/containers.c @@ -1966,6 +1966,7 @@ static void teardown (Fixture *f, gconstpointer context G_GNUC_UNUSED) { + GList *link; gsize i; g_clear_object (&f->proxy); @@ -2002,8 +2003,10 @@ teardown (Fixture *f, g_free (f->bus_address); g_clear_error (&f->error); test_main_context_unref (f->ctx); - g_queue_foreach (&f->name_owner_changes, (GFunc) name_owner_change_free, - NULL); + + for (link = f->name_owner_changes.head; link != NULL; link = link->next) + name_owner_change_free (link->data); + g_queue_clear (&f->name_owner_changes); g_free (f->unconfined_unique_name); -- 2.19.0.rc1