[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/17] meson: sort C warning flags alphabetically
From: |
Daniel P . Berrangé |
Subject: |
[PULL 01/17] meson: sort C warning flags alphabetically |
Date: |
Fri, 9 Feb 2024 14:04:49 +0000 |
When scanning the list of warning flags to see if one is present, it is
helpful if they are in alphabetical order. It is further helpful to
separate out the 'no-' prefixed warnings.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
meson.build | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/meson.build b/meson.build
index e5d6f2d057..74d3aa0b12 100644
--- a/meson.build
+++ b/meson.build
@@ -571,36 +571,38 @@ qemu_common_flags +=
cc.get_supported_arguments(hardening_flags)
add_global_arguments(qemu_common_flags, native: false, language: all_languages)
add_global_link_arguments(qemu_ldflags, native: false, language: all_languages)
-# Collect warnings that we want to enable
-
+# Collect warning flags we want to set, sorted alphabetically
warn_flags = [
- '-Wundef',
- '-Wwrite-strings',
- '-Wmissing-prototypes',
- '-Wstrict-prototypes',
- '-Wredundant-decls',
- '-Wold-style-declaration',
- '-Wold-style-definition',
- '-Wtype-limits',
- '-Wformat-security',
- '-Wformat-y2k',
- '-Winit-self',
- '-Wignored-qualifiers',
+ # First enable interesting warnings
'-Wempty-body',
- '-Wnested-externs',
'-Wendif-labels',
'-Wexpansion-to-defined',
+ '-Wformat-security',
+ '-Wformat-y2k',
+ '-Wignored-qualifiers',
'-Wimplicit-fallthrough=2',
+ '-Winit-self',
'-Wmissing-format-attribute',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wold-style-declaration',
+ '-Wold-style-definition',
+ '-Wredundant-decls',
+ '-Wshadow=local',
+ '-Wstrict-prototypes',
+ '-Wtype-limits',
+ '-Wundef',
+ '-Wwrite-strings',
+
+ # Then disable some undesirable warnings
+ '-Wno-gnu-variable-sized-type-not-at-end',
'-Wno-initializer-overrides',
'-Wno-missing-include-dirs',
+ '-Wno-psabi',
'-Wno-shift-negative-value',
'-Wno-string-plus-int',
- '-Wno-typedef-redefinition',
'-Wno-tautological-type-limit-compare',
- '-Wno-psabi',
- '-Wno-gnu-variable-sized-type-not-at-end',
- '-Wshadow=local',
+ '-Wno-typedef-redefinition',
]
if host_os != 'darwin'
--
2.43.0
- [PULL 00/17] Misc fixes patches, Daniel P . Berrangé, 2024/02/09
- [PULL 01/17] meson: sort C warning flags alphabetically,
Daniel P . Berrangé <=
- [PULL 02/17] crypto: Introduce SM4 symmetric cipher algorithm, Daniel P . Berrangé, 2024/02/09
- [PULL 03/17] qemu_init: increase NOFILE soft limit on POSIX, Daniel P . Berrangé, 2024/02/09
- [PULL 04/17] ui: drop VNC feature _MASK constants, Daniel P . Berrangé, 2024/02/09
- [PULL 05/17] softmmu: remove obsolete comment about libvirt timeouts, Daniel P . Berrangé, 2024/02/09
- [PULL 06/17] scripts: drop comment about autogenerated CPU API file, Daniel P . Berrangé, 2024/02/09
- [PULL 07/17] docs: fix highlighting of CPU ABI header rows, Daniel P . Berrangé, 2024/02/09
- [PULL 10/17] io: add trace event when cancelling TLS handshake, Daniel P . Berrangé, 2024/02/09
- [PULL 11/17] crypto: Support LUKS volume with detached header, Daniel P . Berrangé, 2024/02/09
- [PULL 09/17] chardev: close QIOChannel before unref'ing, Daniel P . Berrangé, 2024/02/09
- [PULL 08/17] docs: re-generate x86_64 ABI compatibility CSV, Daniel P . Berrangé, 2024/02/09