diff options
author | David Robillard <d@drobilla.net> | 2023-04-30 18:01:18 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-30 19:40:06 -0400 |
commit | 69d3e316da32091af15e9494239a0e1a9dfd6ba5 (patch) | |
tree | d2255e2567726e0e978acbdcb6e6eb6cc69a52ce /meson/suppressions | |
parent | bdaebafd3223551b3d9d890070ac0671b3b645c1 (diff) | |
download | lv2-69d3e316da32091af15e9494239a0e1a9dfd6ba5.tar.xz |
Replace strict option with new meson warning level
Diffstat (limited to 'meson/suppressions')
-rw-r--r-- | meson/suppressions/meson.build | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build index 72c68be..b58eb19 100644 --- a/meson/suppressions/meson.build +++ b/meson/suppressions/meson.build @@ -14,7 +14,7 @@ if is_variable('cc') c_suppressions = [] - if get_option('strict') + if get_option('warning_level') == 'everything' if cc.get_id() in ['clang', 'emscripten'] c_suppressions += [ '-Wno-bad-function-cast', @@ -31,7 +31,6 @@ if is_variable('cc') '-Wno-shorten-64-to-32', '-Wno-sign-conversion', '-Wno-switch-enum', - '-Wno-unused-parameter', ] if host_machine.system() == 'windows' @@ -57,7 +56,6 @@ if is_variable('cc') '-Wno-switch-enum', '-Wno-unsuffixed-float-constants', '-Wno-unused-const-variable', - '-Wno-unused-parameter', ] if target_machine.system() == 'windows' @@ -69,7 +67,6 @@ if is_variable('cc') elif cc.get_id() == 'msvc' c_suppressions += [ '/wd4061', # enumerator in switch is not explicitly handled - '/wd4100', # unreferenced formal parameter '/wd4244', # conversion with possible loss of data '/wd4267', # conversion from size_t to a smaller type '/wd4310', # cast truncates constant value @@ -86,6 +83,16 @@ if is_variable('cc') endif endif + if cc.get_id() in ['clang', 'emscripten'] + c_suppressions += ['-Wno-unused-parameter'] + elif cc.get_id() == 'gcc' + c_suppressions += ['-Wno-unused-parameter'] + elif cc.get_id() == 'msvc' + c_suppressions += [ + '/wd4100', # unreferenced formal parameter + ] + endif + c_suppressions = cc.get_supported_arguments(c_suppressions) endif @@ -96,7 +103,7 @@ endif if is_variable('cpp') cpp_suppressions = [] - if get_option('strict') + if get_option('warning_level') == 'everything' if cpp.get_id() in ['clang', 'emscripten'] cpp_suppressions += [ '-Wno-cast-align', |