diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 03:24:21 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 03:24:21 +0000 |
commit | f1c2e2aa3ee9e686f46873214220157e271e573d (patch) | |
tree | be879e9513ecc64d80f7091075f3168699e16033 | |
parent | d1d6b66e15a12469ef3c04a342b2a2f1d6113bb7 (diff) | |
download | ruby-f1c2e2aa3ee9e686f46873214220157e271e573d.tar.gz |
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
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | thread_sync.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c index 705fdb942d..b592104ae8 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -1459,7 +1459,8 @@ rb_thread_sync_reset_all(void) 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; |