From b864eb2eb3bb3b22e8500352cac459ea6ce9cf5c Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Sat, 17 Feb 2024 08:50:24 +0100 Subject: [PATCH] build: rework -Wall and -Wextra declaration Use warning_level instead of defining -Wall and -Wextra explicitly. Fixes the following warning: meson.build:235: WARNING: Consider using the built-in warning_level option instead of using "-Wall". --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index bb1e19e6a..b9e4ee2f0 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,7 @@ project( default_options: [ 'buildtype=debugoptimized', 'c_std=gnu11', + 'warning_level=2' # value "2" will add "-Wall" and "-Wextra" to the compiler flags ], meson_version: '>= 0.47.2', ) @@ -173,8 +174,6 @@ if enable_lto endif common_flags += cc.get_supported_arguments([ - '-Wall', - '-Wextra', '-Wcast-align=strict', '-Wdeclaration-after-statement', '-Wfloat-equal',