From d670fa60a105676a19dd91440f66dc186450b3e8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:06 -0500 Subject: scons: Add warning for missing field initializers This patch adds a warning for missing field initializers for both gcc and clang, and addresses the warnings that were generated. --- SConstruct | 2 ++ 1 file changed, 2 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 3d15f1db6..e91cc0599 100755 --- a/SConstruct +++ b/SConstruct @@ -528,6 +528,7 @@ if main['GCC']: main.Append(CCFLAGS=['-pipe']) main.Append(CCFLAGS=['-fno-strict-aliasing']) main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef']) + main.Append(CXXFLAGS=['-Wmissing-field-initializers']) main.Append(CXXFLAGS=['-std=c++0x']) # Check for versions with bugs @@ -577,6 +578,7 @@ elif main['CLANG']: # Ruby makes frequent use of extraneous parantheses in the printing # of if-statements main.Append(CCFLAGS=['-Wno-parentheses']) + main.Append(CXXFLAGS=['-Wmissing-field-initializers']) main.Append(CXXFLAGS=['-std=c++0x']) # On Mac OS X/Darwin we need to also use libc++ (part of XCode) as # opposed to libstdc++ to make the transition from TR1 to -- cgit v1.2.3