Skip to content

Commit fd94dc8

Browse files
committed
Add -Werror=implicit-fallthrough=5 compiler flag
This requires explicit (not just comments) annotation when falling through a switch clause. Signed-off-by: Keith Packard <[email protected]>
1 parent 8327d0d commit fd94dc8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,8 @@ common_warnings = [
826826
'-Wno-unused-command-line-argument',
827827
'-Wmissing-prototypes',
828828
'-Wmissing-declarations',
829+
'-Werror=implicit-fallthrough=5',
830+
'-Werror=unreachable-code-fallthrough',
829831
]
830832
if get_option('analyzer')
831833
common_warnings += [

0 commit comments

Comments
 (0)