From b6572b15c4b752e888cae608d42b73af11bc26e7 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Tue, 28 Jun 2016 10:56:03 -0700 Subject: [PATCH] Disable warnings triggered in Clang r271374 Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64, Mips images in AOSP and internal branch. http://b/28149048 http://b/29823425 Disable -Wexpansion-to-defined and -Wnull-dereference. The second bug above tracks that these warnings get re-enabled. Change-Id: Ic23f6b51d3f6913fce2b423a15847e8698bab830 --- cc/clang.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cc/clang.go b/cc/clang.go index e9dca327e..be2bfe1a8 100644 --- a/cc/clang.go +++ b/cc/clang.go @@ -88,6 +88,9 @@ func init() { // Force clang to always output color diagnostics. Ninja will strip the ANSI // color codes if it is not running in a terminal. "-fcolor-diagnostics", + + // http://b/29823425 Disable -Wexpansion-to-defined for Clang update to r271374 + "-Wno-expansion-to-defined", }, " ")) pctx.StaticVariable("clangExtraConlyflags", strings.Join([]string{ @@ -98,6 +101,10 @@ func init() { // Disable -Winconsistent-missing-override until we can clean up the existing // codebase for it. "-Wno-inconsistent-missing-override", + + // Bug: http://b/29823425 Disable -Wnull-dereference until the + // new instances detected by this warning are fixed. + "-Wno-null-dereference", }, " ")) pctx.StaticVariable("clangExtraTargetCflags", strings.Join([]string{ @@ -106,7 +113,10 @@ func init() { pctx.StaticVariable("clangExtraNoOverrideCflags", strings.Join([]string{ "-Werror=address-of-temporary", - "-Werror=null-dereference", + // Bug: http://b/29823425 Disable -Wnull-dereference until the + // new cases detected by this warning in Clang r271374 are + // fixed. + //"-Werror=null-dereference", "-Werror=return-type", }, " ")) }