From 87e6b7242c10054ecc703245b02842001ba08e9c Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 17 Oct 2019 18:30:12 +0200 Subject: [PATCH] meson: fix order of compiler flags -Wall and -Wextra should be added before suppression flags such as -Wno-unused-parameter --- meson.build | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 8964091..7bbea8a 100644 --- a/meson.build +++ b/meson.build @@ -39,8 +39,13 @@ mdns_micro_version = ver_arr[2] cc = meson.get_compiler('c') +warning_flags = [] -warning_flags = [ +if cc.get_id() != 'msvc' + warning_flags += ['-Wall', '-Wextra'] +endif + +warning_flags += [ '-Wsign-compare', '-Wstrict-aliasing', '-Wstrict-overflow', @@ -54,10 +59,6 @@ warning_flags = [ '-Wlogical-op', ] -if cc.get_id() != 'msvc' - warning_flags += ['-Wall', '-Wextra'] -endif - add_project_arguments(cc.get_supported_arguments(warning_flags), language: 'c') cdata = configuration_data()