[pango/compiler-warnings: 11/11] build: More compiler warnings




commit c4ea5789f0fcf9404bbbc3aab73888c9fb501252
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 21 21:37:28 2021 -0400

    build: More compiler warnings
    
    Now that the code has been fixed, we can enable
    these warnings. The flags here match what is used
    in GTK.

 meson.build | 43 +++++++++++++++++++++++++++++++++++++++----
 1 file changed, 39 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 92d4a548..63f6e6ce 100644
--- a/meson.build
+++ b/meson.build
@@ -62,15 +62,50 @@ if cc.get_id() == 'msvc'
   test_c_only_flags = []
 elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
   test_c_only_flags = [
+    '-Wno-c++11-extensions',
+    '-Wno-missing-include-dirs',
+    '-Wno-typedef-redefinition',
+    '-Wduplicated-branches',
+    '-Wduplicated-cond',
+    '-Wformat=2',
+    '-Wformat-nonliteral',
+    '-Wformat-security',
+    '-Wignored-qualifiers',
     '-Wimplicit-function-declaration',
-    '-Wstrict-prototypes',
-    '-Wmissing-prototypes',
+    '-Wlogical-op',
+    '-Wmisleading-indentation',
+    '-Wmissing-format-attribute',
+    '-Wmissing-include-dirs',
+    '-Wmissing-noreturn',
     '-Wnested-externs',
     '-Wold-style-definition',
-    '-Wno-int-conversion',
-    '-Wno-discarded-qualifiers',
+    '-Wpointer-arith',
+    '-Wshadow',
+    '-Wstrict-prototypes',
+    '-Wswitch-default',
+    '-Wswitch-enum',
+    '-Wundef',
+    '-Wuninitialized',
+    '-Wunused',
+    '-Werror=address',
+    '-Werror=array-bounds',
+    '-Werror=empty-body',
     '-Werror=implicit',
+    '-Werror=implicit-fallthrough',
+    '-Werror=init-self',
+    '-Werror=int-to-pointer-cast',
+    '-Werror=main',
+    '-Werror=missing-braces',
+    '-Werror=missing-declarations',
+    '-Werror=missing-prototypes',
+    '-Werror=nonnull',
     '-Werror=pointer-to-int-cast',
+    '-Werror=redundant-decls',
+    '-Werror=return-type',
+    '-Werror=sequence-point',
+    '-Werror=trigraphs',
+    '-Werror=vla',
+    '-Werror=write-strings',
   ]
 
   test_cflags = test_c_only_flags + [


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]