[seahorse/wip/nielsdg/warnings: 1/3] meson: change default warning flags
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/wip/nielsdg/warnings: 1/3] meson: change default warning flags
- Date: Tue, 7 May 2019 00:14:55 +0000 (UTC)
commit b5582ba23ce5bae8e4804286731ed4c28e16072e
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon May 6 19:04:23 2019 +0200
meson: change default warning flags
Meson provides very sane defaults for C compiler warnings, so use those
instead. Just make sure to disable the ones we really don't care about
(like `-Wunused-parameter`, which is almost inevitable with callback
functions).
meson.build | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/meson.build b/meson.build
index 822d1cd2..60d141cc 100644
--- a/meson.build
+++ b/meson.build
@@ -103,30 +103,13 @@ add_project_arguments([
'-DGCK_API_SUBJECT_TO_CHANGE',
'-DSECRET_WITH_UNSTABLE',
'-include', 'config.h',
+ # Don't care about unused parameters (which can happen a lot with callbacks)
+ '-Wno-unused-parameter',
+ '-Wno-missing-field-initializers',
],
language: 'c',
)
-# Use more warnings
-warning_flags = [
- '-Wmissing-declarations',
- '-Wmissing-prototypes',
- '-Wnested-externs',
- '-Wpointer-arith',
- '-Wcast-align',
- '-Wsign-compare',
- '-Wno-deprecated-declarations',
-]
-supported_warning_flags = []
-foreach flag : warning_flags
- if cc.has_argument(flag)
- supported_warning_flags += flag
- endif
-endforeach
-add_project_arguments(supported_warning_flags,
- language: 'c',
-)
-
# configuration
conf = configuration_data()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]