From 29ed88a50a94fd6a12cf99b5c6956c17ecd504c9 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 30 Nov 2020 16:19:57 +0100 Subject: [PATCH] meson: Use warning_level feature of meson This is nicer than adding -Wall and gives users more control. Add -Wno-unused-parameter for now as there are lot of places where this would need to be changed and it is reasonable in most cases. Add -Wno-pedantic because it conflicts with g_signal_handlers_disconnect_* --- meson.build | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 2f0d100..88f5aee 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project('fprintd', 'c', license: 'GPLv2+', default_options: [ 'buildtype=debugoptimized', - 'warning_level=1', + 'warning_level=3', 'c_std=gnu99', ], meson_version: '>= 0.50.0') @@ -14,7 +14,6 @@ i18n = import('i18n') cc = meson.get_compiler('c') common_cflags = cc.get_supported_arguments([ '-fno-strict-aliasing', - '-Wall', '-Wcast-align', '-Werror=address', '-Werror=array-bounds', @@ -53,6 +52,15 @@ common_cflags = cc.get_supported_arguments([ ]) add_project_arguments(common_cflags, language: 'c') +common_cflags = cc.get_supported_arguments([ + # The stub passes a lot of params that we do not use, maybe a good idea to + # mark it appropriately, but this works well for now. + '-Wno-unused-parameter', + # We use g_signal_handlers_disconnect_* which is not compatible with -Wpedantic + '-Wno-pedantic', +]) +add_project_arguments(common_cflags, language: 'c') + host_system = host_machine.system() glib_min_version = '2.56' libfprint_min_version = '1.90.1'