Skip to content

Commit

Permalink
Make fallthrough explicit for libworker.c
Browse files Browse the repository at this point in the history
The code currently doesn't compile with LLVM's `-Wimplicit-fallthrough` flag, but the attribute works for both GCC (>=7) and LLVM.
  • Loading branch information
r-barnes authored Jul 22, 2024
1 parent 3af4e44 commit f9bd35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libunbound/libworker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f9bd35d

Please sign in to comment.