1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

meson: re-enable -Wunused-result with clang

We disabled it in f73fb7b742 in response to an
apparent gcc bug. It seems that depending on the combination of optimization
options, gcc still ignores (void). But this seems to work fine with clang, so
let's re-enable the warning conditionally.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-07-06 15:13:00 +02:00
parent 9ca7e3d00d
commit bc2a4af25f

View File

@ -322,7 +322,6 @@ basic_disabled_warnings = [
'-Wno-format-signedness',
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
'-Wno-unused-result',
]
possible_common_cc_flags = [
@ -366,6 +365,12 @@ if cc.get_id() == 'gcc' and (not '02'.contains(get_option('optimization')) or
possible_common_cc_flags += '-Wno-maybe-uninitialized'
endif
# Disable -Wno-unused-result with gcc, see
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425.
if cc.get_id() == 'gcc'
possible_common_cc_flags += '-Wno-unused-result'
endif
# --as-needed and --no-undefined are provided by meson by default,
# run mesonconf to see what is enabled
possible_link_flags = [