From 12eb0343784f52994110df7e7fce4a0b639a6ec3 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 11 Jan 2016 05:52:20 -0500 Subject: scons: Enable -Wextra by default Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial. --- ext/dramsim2/SConscript | 3 ++- ext/libelf/SConscript | 8 ++++---- ext/nomali/SConscript | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'ext') diff --git a/ext/dramsim2/SConscript b/ext/dramsim2/SConscript index f7053c976..bc4c04706 100644 --- a/ext/dramsim2/SConscript +++ b/ext/dramsim2/SConscript @@ -77,7 +77,8 @@ dramenv.Append(CCFLAGS=['-Wno-unused-value']) # If we are using clang, there are more flags to disable if main['CLANG']: - dramenv.Append(CCFLAGS=['-Wno-unused-private-field']) + dramenv.Append(CCFLAGS=['-Wno-unused-private-field', + '-Wno-tautological-undefined-compare']) # Tell DRAMSim2 to not store any data as this is already covered by # the wrapper diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index a110602cc..85820acb3 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -93,10 +93,10 @@ ElfFile('libelf_msize.c') m4env = main.Clone() if m4env['GCC']: - m4env.Append(CCFLAGS=['-Wno-pointer-sign']) - if compareVersions(m4env['GCC_VERSION'], '4.6') >= 0: - m4env.Append(CCFLAGS=['-Wno-unused-but-set-variable', - '-Wno-implicit-function-declaration']) + m4env.Append(CCFLAGS=['-Wno-pointer-sign', + '-Wno-unused-but-set-variable', + '-Wno-implicit-function-declaration', + '-Wno-override-init']) if m4env['CLANG']: m4env.Append(CCFLAGS=['-Wno-initializer-overrides', '-Wno-pointer-sign']) # clang defaults to c99 (while gcc defaults to gnu89) and there is a diff --git a/ext/nomali/SConscript b/ext/nomali/SConscript index 669908148..2ccd44496 100644 --- a/ext/nomali/SConscript +++ b/ext/nomali/SConscript @@ -42,6 +42,7 @@ Import('main') main.Prepend(CPPPATH=Dir('./include')) nomali = main.Clone() +nomali.Append(CCFLAGS=['-Wno-ignored-qualifiers']) nomali_sources = [ "lib/gpu.cc", -- cgit v1.2.3