summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-12-27 15:00:46 -0800
committerGary E. Miller <gem@rellim.com>2018-12-27 15:00:46 -0800
commit646bcca45a5b721143a38bfe22200b18435e37f7 (patch)
tree765fb962efbe1fc1815b72e6c4c874f4758b1864 /SConstruct
parent21a28ddec4f8f7bfb8a07f2be7cace6ba6e9a346 (diff)
downloadgpsd-646bcca45a5b721143a38bfe22200b18435e37f7.tar.gz
SConstruct: Add -Wimplicit-fallthrough, if possible.
This tells the cc to check implicit fallthrought between cases. The magic comment: /* FALLTHROUGH */ suppressed the warning. Supported by osX, unlike __attribute__ ((fallthough)) which is a gnu-ism.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct19
1 files changed, 15 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 953ddbff..38c1b689 100644
--- a/SConstruct
+++ b/SConstruct
@@ -986,11 +986,22 @@ else:
# because we can't seem to keep scons from passing these to g++.
#
# Do this after the other config checks, to keep warnings out of them.
- for option in ('-Wextra', '-Wall', '-Wno-uninitialized',
+ for option in ('-Wall',
+ '-Wcast-align',
+ '-Wextra',
+ # -Wimplicit-fallthrough same as
+ # -Wimplicit-fallthrough=3, except osX hates the
+ # second flavor
+ '-Wimplicit-fallthrough',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
'-Wno-missing-field-initializers',
- '-Wcast-align', '-Wmissing-declarations',
- '-Wmissing-prototypes', "-Wvla",
- '-Wstrict-prototypes', '-Wpointer-arith', '-Wreturn-type'):
+ '-Wno-uninitialized',
+ '-Wpointer-arith',
+ '-Wreturn-type',
+ '-Wstrict-prototypes',
+ '-Wvla',
+ ):
if option not in config.env['CFLAGS']:
config.CheckCompilerOption(option)