8000 offsetof(type, foo.bar) is (arguably) a GCCism · willnet/ruby@85e9f28 · GitHub
[go: up one dir, main page]

Skip to content

Commit 85e9f28

Browse files
committed
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
1 parent 9930481 commit 85e9f28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

thread_sync.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,8 @@ rb_thread_sync_reset_all(void)
14591459
list_head_init(queue_waitq(q));
14601460
q->num_waiting = 0;
14611461
}
1462-
list_for_each(&szqueue_list, sq, q.live) {
1462+
list_for_each(&szqueue_list, q, live) {
1463+
sq = container_of(q, struct rb_szqueue, q);
14631464
list_head_init(szqueue_waitq(sq));
14641465
list_head_init(szqueue_pushq(sq));
14651466
sq->num_waiting_push = 0;

0 commit comments

Comments
 (0)
0