meson: get rid of list of unused warning flags

We're not using these warning flags with libvirt, and it is not worth
keeping them just to issue a warning if someone tries to enable them.
If someone does try to enable them, either libvirt will build cleanly
or it won't.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-04-07 18:16:50 +01:00
parent ee387289dd
commit a0e5aca072

View File

@ -491,82 +491,6 @@ if not cc.compiles(w_unused_function_code, args: w_unused_function_args)
cc_flags += ['-Wno-unused-function']
endif
cc_flags_disabled = [
# In meson this is specified using 'c_std=gnu99' in project() function.
'-std=gnu99',
# don't care about C++ compiler compat
'-Wc++-compat',
'-Wabi',
'-Wdeprecated',
# Don't care about ancient C standard compat
'-Wtraditional',
'-Wtraditional-conversion',
# Ignore warnings in /usr/include
'-Wsystem-headers',
# Happy for compiler to add struct padding
'-Wpadded',
# GCC very confused with -O2
'-Wunreachable-code',
# Too many to deal with
'-Wconversion',
'-Wsign-conversion',
# Need to allow bad cast for execve()
'-Wcast-qual',
# We need to use long long in many places
'-Wlong-long',
# We allow manual list of all enum cases without default
'-Wswitch-default',
# Not a problem since we don't use -fstrict-overflow
'-Wstrict-overflow',
# Not a problem since we don't use -funsafe-loop-optimizations
'-Wunsafe-loop-optimizations',
# gcc 4.4.6 complains this is C++ only; gcc 4.7.0 implies this from -Wall
'-Wenum-compare',
# gcc 5.1 -Wformat-signedness mishandles enums, not ready for prime time
'-Wformat-signedness',
# Several conditionals expand the same on both branches depending on the
# particular platform/architecture
'-Wduplicated-branches',
# > This warning does not generally indicate that there is anything wrong
# > with your code; it merely indicates that GCC's optimizers are unable
# > to handle the code effectively.
# Source: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
'-Wdisabled-optimization',
# Various valid glib APIs/macros trigger this warning
'-Wbad-function-cast',
# We might fundamentally need some of these disabled forever, but
# ideally we'd turn many of them on
'-Wfloat-equal',
'-Wpacked',
'-Wunused-macros',
'-Woverlength-strings',
'-Wstack-protector',
'-Wsuggest-attribute=malloc',
]
foreach flag : cc_flags_disabled
if cc_flags.contains(flag)
error('@0@ is disabled but listed in cc_flags'.format(flag))
endif
endforeach
supported_cc_flags = cc.get_supported_arguments(cc_flags)
add_project_arguments(supported_cc_flags, language: 'c')