]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Make fallthrough explicit for libworker.c 1110/head
authorRichard Barnes <rbarnes@umn.edu>
Mon, 22 Jul 2024 23:37:38 +0000 (16:37 -0700)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2024 23:37:38 +0000 (16:37 -0700)
The code currently doesn't compile with LLVM's `-Wimplicit-fallthrough` flag, but the attribute works for both GCC (>=7) and LLVM.

libunbound/libworker.c

index 5c75f61d8dcb2e1430d7b3d2bfeee65ec0a44fff..191aa0b278554e34c06385c6985a23e9680e46db 100644 (file)
@@ -292,7 +292,7 @@ libworker_do_cmd(struct libworker* w, uint8_t* msg, uint32_t len)
                        log_err("unknown command for bg worker %d", 
                                (int)context_serial_getcmd(msg, len));
                        /* and fall through to quit */
-                       /* fallthrough */
+                       __attribute__((fallthrough));
                case UB_LIBCMD_QUIT:
                        free(msg);
                        comm_base_exit(w->base);