summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-11-16 09:52:39 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-16 16:57:36 +0100
commit054ed43075af2e35db85d14708d0aea7e848a5d6 (patch)
tree773c44a36637134cc3bdb1782771e958d55e8856
parentb15f6eae421ad64773c0be934fd372d1ca230adb (diff)
downloadsystemd-054ed43075af2e35db85d14708d0aea7e848a5d6.tar.gz
meson: Downgrade unused function from error to warning in local builds
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.
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index cc6981825e..21819cca89 100644
--- a/meson.build
+++ b/meson.build
@@ -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.