meson.build: update warning flags

-Wextra is removed, some of the warning flags included in -Wextra are
now explicitly set.

-Wno-unused-parameter is removed. The warnings will take a while to fix.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-07-25 01:02:23 +01:00
parent 62878d7c57
commit 6f8ea5f740
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 5 additions and 2 deletions

View File

@ -53,8 +53,11 @@ if cc.has_header('stdc-predef.h')
add_global_arguments('-DHAS_STDC_PREDEF_H', language: 'c')
endif
warns = [ 'all', 'extra', 'no-unused-parameter', 'nonnull', 'shadow', 'no-type-limits',
'implicit-fallthrough', 'no-unknown-warning-option', 'no-missing-braces', 'conversion' ]
warns = [ 'all', 'cast-function-type', 'ignored-qualifiers', 'missing-parameter-type',
'nonnull', 'shadow', 'no-type-limits', 'old-style-declaration', 'override-init',
'sign-compare', 'type-limits', 'uninitialized', 'shift-negative-value',
'unused-but-set-parameter', 'unused-parameter', 'implicit-fallthrough',
'no-unknown-warning-option', 'no-missing-braces', 'conversion' ]
foreach w : warns
if cc.has_argument('-W'+w)
add_global_arguments('-W'+w, language: 'c')