Skip to content

Commit

Permalink
build: add -Wswitch to clang for more consistency with gcc
Browse files Browse the repository at this point in the history
gcc12 and gcc13 appear to include Wswitch with Wall, while
clang doesn't. For switch() statements on enum, this forces
the use of at least a default: clause, in adherance with style(9).

Reviewed By:	emaste
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D44092
  • Loading branch information
rscheff committed Mar 22, 2024
1 parent af700f4 commit 56b40c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/conf/kern.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CWARNFLAGS?= -Wall -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Wcast-qual \
-Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \
-Wmissing-include-dirs -fdiagnostics-show-option \
-Wno-unknown-pragmas \
-Wno-unknown-pragmas -Wswitch \
${CWARNEXTRA}
#
# The following flags are next up for working on:
Expand Down

0 comments on commit 56b40c2

Please sign in to comment.