Skip to content

Properly annotate fallthrough in kevent backend. #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/event/event_kevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ _dispatch_kq_poll(dispatch_wlh_t wlh, dispatch_kevent_t ke, int n,
switch (err) {
case ENOMEM:
_dispatch_temporary_resource_shortage();
/* FALLTHROUGH */
DISPATCH_FALLTHROUGH;
case EINTR:
goto retry;
case EBADF:
Expand All @@ -754,7 +754,7 @@ _dispatch_kq_poll(dispatch_wlh_t wlh, dispatch_kevent_t ke, int n,
(flags & KEVENT_FLAG_DYNAMIC_KQ_MUST_EXIST)) {
return 0;
}
/* FALLTHROUGH */
DISPATCH_FALLTHROUGH;
#endif // DISPATCH_USE_KEVENT_WORKLOOP
default:
DISPATCH_CLIENT_CRASH(err, "Unexpected error from kevent");
Expand Down Expand Up @@ -1410,7 +1410,7 @@ _dispatch_kq_fill_workloop_event(dispatch_kevent_t ke, int which,
switch (which) {
case DISPATCH_WORKLOOP_ASYNC_FROM_SYNC:
fflags |= NOTE_WL_END_OWNERSHIP;
/* FALLTHROUGH */
DISPATCH_FALLTHROUGH;
case DISPATCH_WORKLOOP_ASYNC:
case DISPATCH_WORKLOOP_ASYNC_DISCOVER_SYNC:
case DISPATCH_WORKLOOP_ASYNC_QOS_UPDATE:
Expand All @@ -1434,10 +1434,10 @@ _dispatch_kq_fill_workloop_event(dispatch_kevent_t ke, int which,

case DISPATCH_WORKLOOP_ASYNC_LEAVE_FROM_SYNC:
fflags |= NOTE_WL_END_OWNERSHIP;
/* FALLTHROUGH */
DISPATCH_FALLTHROUGH;
case DISPATCH_WORKLOOP_ASYNC_LEAVE_FROM_TRANSFER:
fflags |= NOTE_WL_IGNORE_ESTALE;
/* FALLTHROUGH */
DISPATCH_FALLTHROUGH;
case DISPATCH_WORKLOOP_ASYNC_LEAVE:
dispatch_assert(!_dq_state_is_enqueued_on_target(dq_state));
action = EV_ADD | EV_DELETE | EV_ENABLE;
Expand Down