git: 56b40c285b59 - main - build: add -Wswitch to clang for more consistency with gcc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 22 Mar 2024 10:40:31 UTC
The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=56b40c285b5994d64e7e8fba821c57f86e91502c commit 56b40c285b5994d64e7e8fba821c57f86e91502c Author: Richard Scheffenegger <rscheff@FreeBSD.org> AuthorDate: 2024-03-21 21:47:39 +0000 Commit: Richard Scheffenegger <rscheff@FreeBSD.org> CommitDate: 2024-03-22 00:39:01 +0000 build: add -Wswitch to clang for more consistency with gcc 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 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 53781927dee8..5cd3a43f01b8 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -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: