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:
parent
62878d7c57
commit
6f8ea5f740
|
@ -53,8 +53,11 @@ if cc.has_header('stdc-predef.h')
|
||||||
add_global_arguments('-DHAS_STDC_PREDEF_H', language: 'c')
|
add_global_arguments('-DHAS_STDC_PREDEF_H', language: 'c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
warns = [ 'all', 'extra', 'no-unused-parameter', 'nonnull', 'shadow', 'no-type-limits',
|
warns = [ 'all', 'cast-function-type', 'ignored-qualifiers', 'missing-parameter-type',
|
||||||
'implicit-fallthrough', 'no-unknown-warning-option', 'no-missing-braces', 'conversion' ]
|
'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
|
foreach w : warns
|
||||||
if cc.has_argument('-W'+w)
|
if cc.has_argument('-W'+w)
|
||||||
add_global_arguments('-W'+w, language: 'c')
|
add_global_arguments('-W'+w, language: 'c')
|
||||||
|
|
Loading…
Reference in New Issue