[gnome-photos] build: Add the remaining -Wextra warnings in GCC 8 to the Meson build



commit 4e0a1502a5c89a08ee50ae94b47ab35a0201d401
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 e9040dba..8a7c26e9 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]