summaryrefslogtreecommitdiffstats
path: root/lib/workqueue.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-10-10 23:15:32 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2023-10-12 20:23:18 +0200
commit7d67b9ff28d09de58c632f80ef7d330e45e698f6 (patch)
tree16c8afc9dc80d70951f83d2f1182ace0edc7ee49 /lib/workqueue.c
parentMerge pull request #14559 from opensourcerouting/feature/update_dev_versions_... (diff)
downloadfrr-7d67b9ff28d09de58c632f80ef7d330e45e698f6.tar.xz
frr-7d67b9ff28d09de58c632f80ef7d330e45e698f6.zip
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c
index fa5d58536..2281c4c36 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);