From 1d03a572d7d88819a0f024d0d110caae1c2f42ab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 24 Nov 2024 17:09:30 -0500 Subject: Clean up and strengthen warning flags Some previously global suppressions were only actually needed in benchmarks or tests, so move them there to keep the main set as small as possible. --- test/meson.build | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'test/meson.build') diff --git a/test/meson.build b/test/meson.build index 309551f..63141bb 100644 --- a/test/meson.build +++ b/test/meson.build @@ -52,12 +52,20 @@ endif # Set warning suppression flags specific to tests test_suppressions = [] -if host_machine.system() == 'windows' - if cc.get_id() in ['clang', 'emscripten'] - test_suppressions += [ - '-Wno-format-nonliteral', - ] - elif cc.get_id() == 'gcc' +if cc.get_id() in ['clang', 'emscripten'] + if warning_level == 'everything' + test_suppressions += ['-Wno-bad-function-cast'] + + if host_machine.system() == 'windows' + if cc.get_id() in ['clang', 'emscripten'] + test_suppressions += ['-Wno-format-nonliteral'] + endif + endif + endif +elif cc.get_id() == 'gcc' + test_suppressions += ['-Wno-bad-function-cast'] + + if host_machine.system() == 'windows' test_suppressions += ['-Wno-format'] endif endif -- cgit v1.2.1