meson.build: no -Wimplicit-fallthrough when building with clang

clang does not recognize the fallthrough annotation used in uthash.h, so we
change -Wimplicit-fallthrough to the single argument form currently only
supported by GCC.

We are still detecting implicit fallthroughs with GCC in CI.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-09-30 11:26:50 +01:00
parent c1dc11f59c
commit 7107241519
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ if get_option('warning_level') != '0'
warns = [ 'cast-function-type', 'ignored-qualifiers', 'missing-parameter-type', warns = [ 'cast-function-type', 'ignored-qualifiers', 'missing-parameter-type',
'nonnull', 'shadow', 'no-type-limits', 'old-style-declaration', 'override-init', 'nonnull', 'shadow', 'no-type-limits', 'old-style-declaration', 'override-init',
'sign-compare', 'type-limits', 'uninitialized', 'shift-negative-value', 'sign-compare', 'type-limits', 'uninitialized', 'shift-negative-value',
'unused-but-set-parameter', 'unused-parameter', 'implicit-fallthrough', 'unused-but-set-parameter', 'unused-parameter', 'implicit-fallthrough=2',
'no-unknown-warning-option', 'no-missing-braces', 'conversion', 'empty-body' ] 'no-unknown-warning-option', 'no-missing-braces', 'conversion', 'empty-body' ]
foreach w : warns foreach w : warns
if cc.has_argument('-W'+w) if cc.has_argument('-W'+w)