Only set -Wall once.

We set -Wall in the global cflags, and then again at the point where we
decide whether or not to add -Werror. The trouble with this is that it
undoes the effect of any attempt to disable a warning implied by -Wall.

Discovered while trying to enable -Wmisleading-indentation (which is
part of -Wall) in a way that doesn't apply to external/ or vendor/.

Test: treehugger
Change-Id: I68d74fb05922dd9f6bd4c8423ca69b485c15e3d2
This commit is contained in:
Elliott Hughes
2022-05-18 13:15:00 -07:00
parent 7583481570
commit ed4a27b2e1
2 changed files with 2 additions and 3 deletions

View File

@@ -4041,7 +4041,7 @@ func TestIncludeDirectoryOrdering(t *testing.T) {
conly := []string{"-fPIC", "${config.CommonGlobalConlyflags}"}
cppOnly := []string{"-fPIC", "${config.CommonGlobalCppflags}", "${config.DeviceGlobalCppflags}", "${config.ArmCppflags}"}
cflags := []string{"-Wall", "-Werror", "-std=candcpp"}
cflags := []string{"-Werror", "-std=candcpp"}
cstd := []string{"-std=gnu11", "-std=conly"}
cppstd := []string{"-std=gnu++17", "-std=cpp", "-fno-rtti"}