[gnome-photos/gnome-3-30] build: Add the remaining -Wextra warnings in GCC 8 to the Meson build
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-30] build: Add the remaining -Wextra warnings in GCC 8 to the Meson build
- Date: Mon, 1 Oct 2018 13:46:18 +0000 (UTC)
commit 30ca9d6935d54b3eee1c8b52b4c4d9f80bdde145
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Sep 27 09:09:24 2018 +0200
build: Add the remaining -Wextra warnings in GCC 8 to the Meson build
The Autotools build uses -Wextra because it's on the AX_COMPILER_FLAGS
list. However, using -Wextra directly is problematic because newer
compilers can add more warnings to the -Wextra umbrella, and some of
them might not be fit for this codebase. eg., GCC 8 added
-Wcast-function-type, which can't be sanely used with the GNOME
platform (see commit bb290a1e53cbbcf0). This is why the Meson build
tries to avoid -Wextra. Instead, it is better to explicitly list out
the desired warnings from the -Wextra umbrella.
The warnings that were explicitly listed out in AX_COMPILER_FLAGS were
already present in the initial port to Meson. This fills in the rest
that weren't explicitly listed but were still enabled by -Wextra.
meson.build | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/meson.build b/meson.build
index 640e317f..b6b680e9 100644
--- a/meson.build
+++ b/meson.build
@@ -76,17 +76,24 @@ endif
common_flags += cc.get_supported_arguments([
'-fno-strict-aliasing',
'-Wcast-align',
+ '-Wclobbered',
'-Wdeclaration-after-statement',
+ '-Wempty-body',
'-Wformat=2',
+ '-Wignored-qualifiers',
+ '-Wimplicit-fallthrough=3',
'-Winit-self',
'-Winline',
'-Wmissing-declarations',
+ '-Wmissing-field-initializers',
'-Wmissing-format-attribute',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
+ '-Wmissing-parameter-type',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
+ '-Woverride-init',
'-Wpacked',
'-Wpointer-arith',
'-Wredundant-decls',
@@ -95,7 +102,10 @@ common_flags += cc.get_supported_arguments([
'-Wstrict-prototypes',
'-Wswitch-default',
'-Wswitch-enum',
+ '-Wtype-limits',
'-Wundef',
+ '-Wuninitialized',
+ '-Wunused',
'-Wwrite-strings',
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]