ruby-changes:50917
From: shyouhei <ko1@a...>
Date: Mon, 9 Apr 2018 12:24:29 +0900 (JST)
Subject: [ruby-changes:50917] shyouhei:r63124 (trunk): offsetof(type, foo.bar) is (arguably) a GCCism
shyouhei 2018-04-09 12:24:21 +0900 (Mon, 09 Apr 2018) New Revision: 63124 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63124 Log: offsetof(type, foo.bar) is (arguably) a GCCism clang -Wextended-offsetof warns this line. CF: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2031.htm Modified files: trunk/thread_sync.c Index: thread_sync.c =================================================================== --- thread_sync.c (revision 63123) +++ thread_sync.c (revision 63124) @@ -1459,7 +1459,8 @@ rb_thread_sync_reset_all(void) https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L1459 list_head_init(queue_waitq(q)); q->num_waiting = 0; } - list_for_each(&szqueue_list, sq, q.live) { + list_for_each(&szqueue_list, q, live) { + sq = container_of(q, struct rb_szqueue, q); list_head_init(szqueue_waitq(sq)); list_head_init(szqueue_pushq(sq)); sq->num_waiting_push = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/