Add default -Wimplicit-fallthrough.

After we fix all existing such warnings, it can be changed to an error.

Bug: 112564944
Test: make checkbuild
Change-Id: I61ee3a24a3f992ef018cfe6c995e957416551183
This commit is contained in:
Chih-Hung Hsieh
2018-08-14 13:20:38 -07:00
committed by Chih-hung Hsieh
parent 1c7e0a235b
commit bd783f13c1

View File

@@ -103,6 +103,10 @@ func init() {
pctx.StaticVariable("ClangExtraCflags", strings.Join([]string{
"-D__compiler_offsetof=__builtin_offsetof",
// Make implicit fallthrough an error in the future.
"-Wimplicit-fallthrough",
"-Wno-error=implicit-fallthrough",
// Help catch common 32/64-bit errors.
"-Werror=int-conversion",