[gtk: 43/72] build: Only add -Wcast-align for gcc
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 43/72] build: Only add -Wcast-align for gcc
- Date: Wed, 14 Oct 2020 19:08:12 +0000 (UTC)
commit ef7c5747c4b49c8763ebc891896561334329bae0
Author: Timm Bäder <mail baedert org>
Date: Sat Oct 10 08:43:52 2020 +0200
build: Only add -Wcast-align for gcc
Either we or clang needs to get its shit together about this warning.
But using it during development with clang just makes actually usable
warnings get lost in a flood of -Wcast-align warnings.
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 40f31f9f3c..ce6b962f4c 100644
--- a/meson.build
+++ b/meson.build
@@ -250,7 +250,6 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Wno-c++11-extensions',
'-Wno-missing-include-dirs',
'-Wno-typedef-redefinition',
- '-Wcast-align',
'-Wduplicated-branches',
'-Wduplicated-cond',
'-Wformat=2',
@@ -294,6 +293,10 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Werror=vla',
'-Werror=write-strings',
]
+
+ if cc.get_id() == 'gcc'
+ test_cflags += ['-Wcast-align'] # This warns too much on clang
+ endif
else
test_cflags = []
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]