From 4a09b7de06e5be65409b066b3dccd04cd7529d89 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 28 Nov 2021 17:45:55 +0900 Subject: [PATCH] Suppress address-of-packed-member warning by gcc --- thread_sync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/thread_sync.c b/thread_sync.c index 98d95ff009..33a0d5e9ca 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -1011,7 +1011,9 @@ queue_do_pop(VALUE self, struct rb_queue *q, int should_block) .as = {.q = q} }; - list_add_tail(queue_waitq(queue_waiter.as.q), &queue_waiter.w.node); + struct list_head *waitq = queue_waitq(q); + + list_add_tail(waitq, &queue_waiter.w.node); queue_waiter.as.q->num_waiting++; rb_ensure(queue_sleep, self, queue_sleep_done, (VALUE)&queue_waiter);