diff options
author | Gary E. Miller <gem@rellim.com> | 2018-12-27 15:00:46 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-12-27 15:00:46 -0800 |
commit | 646bcca45a5b721143a38bfe22200b18435e37f7 (patch) | |
tree | 765fb962efbe1fc1815b72e6c4c874f4758b1864 /SConstruct | |
parent | 21a28ddec4f8f7bfb8a07f2be7cace6ba6e9a346 (diff) | |
download | gpsd-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-- | SConstruct | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -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) |