]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Downgrade unused function from error to warning in local builds
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 16 Nov 2021 09:52:39 +0000 (09:52 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Nov 2021 15:57:36 +0000 (16:57 +0100)
When working on systemd, it's often useful to be able to comment out
a function to see how a build behaves without it. Currently, when doing
this with a static function that's only used once, the build fails because
the function then becomes unused. As such, Let's downgrade the unused
function error to a warning in local builds.

meson.build

index cc6981825eb9f08db4294a2b2a75c0c0a08dfb1c..21819cca8984ab1b7a4b19b65fdf3f2af71371d6 100644 (file)
@@ -348,7 +348,6 @@ possible_common_cc_flags = [
         '-Werror=shift-count-overflow',
         '-Werror=shift-overflow=2',
         '-Werror=undef',
-        '-Werror=unused-function',
         '-Wfloat-equal',
         '-Wimplicit-fallthrough=5',
         '-Winit-self',
@@ -363,6 +362,7 @@ possible_common_cc_flags = [
         '-Wstrict-aliasing=2',
         '-Wstrict-prototypes',
         '-Wsuggest-attribute=noreturn',
+        '-Wunused-function',
         '-Wwrite-strings',
 
         # negative arguments are correctly detected starting with meson 0.46.