diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-11 00:15:32 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-12 21:23:18 +0300 |
| commit | 7d67b9ff28d09de58c632f80ef7d330e45e698f6 (patch) | |
| tree | 16c8afc9dc80d70951f83d2f1182ace0edc7ee49 /lib/workqueue.c | |
| parent | 9bc4d9eaec92589deda092bd867054e25e64be3f (diff) | |
build: add -Wimplicit-fallthrough
Also:
- replace all /* fallthrough */ comments with portable fallthrough;
pseudo keyword to accomodate both gcc and clang
- add missing break; statements as required by older versions of gcc
- cleanup some code to remove unnecessary fallthrough
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/workqueue.c')
| -rw-r--r-- | lib/workqueue.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index fa5d585360..2281c4c369 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -271,9 +271,10 @@ void work_queue_run(struct event *thread) switch (ret) { case WQ_QUEUE_BLOCKED: { /* decrement item->ran again, cause this isn't an item - * specific error, and fall through to WQ_RETRY_LATER + * specific error, and retry later */ item->ran--; + goto stats; } case WQ_RETRY_LATER: { goto stats; @@ -296,9 +297,10 @@ void work_queue_run(struct event *thread) break; } case WQ_RETRY_NOW: - /* a RETRY_NOW that gets here has exceeded max_tries, same as - * ERROR */ - /* fallthru */ + /* a RETRY_NOW that gets here has exceeded max_tries, same + * as ERROR + */ + fallthrough; case WQ_SUCCESS: default: { work_queue_item_remove(wq, item); |
