From f20732495984a6783847a691b2acd725586e3788 Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Fri, 16 Dec 2022 11:10:46 +0100 Subject: [PATCH] Workaround build failure by -Wpedantic with GCC 12 With GCC 12, even with -std=gnu99, -Wpedantic complains about %m in format strings, __PRETTY_FUNCTION__, braces inside expressions, etc.; and it makes some of these into errors. Closes: https://todo.sr.ht/~emersion/basu/18 Signed-off-by: Ismael Luceno --- meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e54baad..b5d7be8 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,13 @@ project( 'c', version : '0.2.0', license : 'LGPLv2+', - default_options : ['c_std=gnu99', 'prefix=/usr', 'sysconfdir=/etc', 'localstatedir=/var'], + default_options : [ + 'c_std=gnu99', + 'prefix=/usr', + 'sysconfdir=/etc', + 'localstatedir=/var', + 'warning_level=2', + ], meson_version : '>= 0.54' ) @@ -22,7 +28,6 @@ cc = meson.get_compiler('c') cxx_cmd = '' possible_cc_flags = [ - '-Wextra', '-Werror=undef', '-Wlogical-op', '-Wmissing-include-dirs', -- 2.38.5