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 id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersted
bugs563195
milestone21.0a1
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 \