Bug 563195: Add -Wshadow to CFLAGS/CXXFLAGS for layout/style. r=ted
authorL. David Baron <dbaron@dbaron.org>
Sun, 17 Feb 2013 22:56:32 -0800
changeset 122210 df03beb83b39fa9fac1267bb785086d9094fb482
parent 122209 ff75b06e2330e7586556bdea50c31e27ff550a55
child 122211 9e0279c63245a179ec1c3efd6b4fdb365b49c95a
push id24322
push userdbaron@mozilla.com
push dateMon, 18 Feb 2013 08:55:11 +0000
treeherdermozilla-central@0acbd06d48a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs563195
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 563195: Add -Wshadow to CFLAGS/CXXFLAGS for layout/style. r=ted Since this directory has FAIL_ON_WARNINGS set, this will cause any shadowing warnings triggered by headers included in layout/style to cause errors. Once this patch is reviewed, I'll write and attach patches to fix the warnings needed to land this.
layout/style/Makefile.in
--- a/layout/style/Makefile.in
+++ b/layout/style/Makefile.in
@@ -17,16 +17,21 @@ endif
 
 MODULE		= layout
 LIBRARY_NAME	= gkstyle_s
 LIBXUL_LIBRARY	= 1
 ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
 endif # !_MSC_VER
 
+ifdef GNU_CC
+OS_CFLAGS := $(OS_CFLAGS) -Wshadow
+OS_CXXFLAGS := $(OS_CXXFLAGS) -Wshadow
+endif
+
 EXPORTS_NAMESPACES = mozilla/css mozilla/dom
 
 EXPORTS		= \
 		AnimationCommon.h \
 		nsAnimationManager.h \
 		nsCSSAnonBoxList.h \
 		nsCSSAnonBoxes.h \
 		nsCSSFontDescList.h \