Blame SOURCES/0085-meson-Use-stricter-C-arguments-to-compile-libfprint.patch

73b847
From 59ef7ba5213ea17a451c2d0f2806a5f70181721c Mon Sep 17 00:00:00 2001
73b847
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
73b847
Date: Wed, 4 Dec 2019 14:27:33 +0100
73b847
Subject: [PATCH 085/181] meson: Use stricter C arguments to compile libfprint
73b847
73b847
These are based on what mutter does, being a quite strict project on c code
73b847
quality.
73b847
---
73b847
 meson.build | 37 +++++++++++++++++++++++++++++++++----
73b847
 1 file changed, 33 insertions(+), 4 deletions(-)
73b847
73b847
diff --git a/meson.build b/meson.build
73b847
index 65077c5..1561ebf 100644
73b847
--- a/meson.build
73b847
+++ b/meson.build
73b847
@@ -21,20 +21,49 @@ glib_version_def = 'GLIB_VERSION_@0@_@1@'.format(
73b847
     glib_min_version.split('.')[0], glib_min_version.split('.')[1])
73b847
 common_cflags = cc.get_supported_arguments([
73b847
     '-Wall',
73b847
+    '-Wcast-align',
73b847
+    '-Wformat-nonliteral',
73b847
+    '-Wformat-security',
73b847
+    '-Wformat=2',
73b847
+    '-Wignored-qualifiers',
73b847
+    '-Wlogical-op',
73b847
+    '-Wmissing-declarations',
73b847
+    '-Wmissing-format-attribute',
73b847
+    '-Wmissing-include-dirs',
73b847
+    '-Wmissing-noreturn',
73b847
+    '-Wpointer-arith',
73b847
+    '-Wshadow',
73b847
     '-Wtype-limits',
73b847
     '-Wundef',
73b847
     '-Wunused',
73b847
-    '-Wstrict-prototypes',
73b847
-    '-Werror-implicit-function-declaration',
73b847
-    '-Wshadow',
73b847
+    '-Werror=address',
73b847
+    '-Werror=array-bounds',
73b847
+    '-Werror=empty-body',
73b847
+    '-Werror=init-self',
73b847
+    '-Werror=int-to-pointer-cast',
73b847
+    '-Werror=main',
73b847
+    '-Werror=missing-braces',
73b847
+    '-Werror=nonnull',
73b847
+    '-Werror=redundant-decls',
73b847
+    '-Werror=return-type',
73b847
+    '-Werror=sequence-point',
73b847
+    '-Werror=trigraphs',
73b847
+    '-Werror=write-strings',
73b847
+    '-fno-strict-aliasing',
73b847
     '-DGLIB_VERSION_MIN_REQUIRED=' + glib_version_def,
73b847
     '-DGLIB_VERSION_MAX_ALLOWED=' + glib_version_def,
73b847
     '-D_GNU_SOURCE',
73b847
     '-DG_LOG_DOMAIN="libfprint"',
73b847
 ])
73b847
 c_cflags = cc.get_supported_arguments([
73b847
-    '-fgnu89-inline',
73b847
     '-std=gnu99',
73b847
+    '-Wimplicit-function-declaration',
73b847
+    '-Wmissing-prototypes',
73b847
+    '-Wnested-externs',
73b847
+    '-Wold-style-definition',
73b847
+    '-Wstrict-prototypes',
73b847
+    '-Werror=implicit',
73b847
+    '-Werror=pointer-to-int-cast',
73b847
 ])
73b847
 add_project_arguments(common_cflags + c_cflags, language: 'c')
73b847
 add_project_arguments(common_cflags, language: 'cpp')
73b847
-- 
73b847
2.24.1
73b847