summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-16 17:26:12 -0400
committerDavid Robillard <d@drobilla.net>2021-09-16 20:57:48 -0400
commit598d238377dfe13b45225cc7a1111e7fdb63f751 (patch)
treea9721d31aa266cdec6e99f0b99d658a5aaa8b1f8
parentdcd887eb8326ec195149c7fd6711ddb715c4ad1f (diff)
downloadzix-598d238377dfe13b45225cc7a1111e7fdb63f751.tar.gz
zix-598d238377dfe13b45225cc7a1111e7fdb63f751.tar.bz2
zix-598d238377dfe13b45225cc7a1111e7fdb63f751.zip
Suppress warnings in non-strict builds
-rw-r--r--meson.build8
1 files changed, 6 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 45009c4..9324354 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,10 @@ if cc.get_id() == 'clang'
c_warnings = [
'-Wno-nullability-extension',
]
+elif cc.get_id() == 'msvc'
+ c_warnings += [
+ '/wd4706', # assignment within conditional expression
+ ]
endif
# Set ultra strict warnings for developers, if requested
@@ -118,7 +122,6 @@ if get_option('strict')
'/wd4200', # zero-sized array in struct/union
'/wd4365', # signed/unsigned mismatch
'/wd4514', # unreferenced inline function has been removed
- '/wd4706', # assignment within conditional expression
'/wd4710', # function not inlined
'/wd4711', # function selected for automatic inline expansion
'/wd4777', # format string and argument mismatch
@@ -135,9 +138,10 @@ if get_option('strict')
]
endif
- add_project_arguments(cc.get_supported_arguments(c_warnings), language: ['c'])
endif
+add_project_arguments(cc.get_supported_arguments(c_warnings), language: ['c'])
+
if cc.get_id() == 'msvc'
# Build as C++
add_project_arguments(['/TP'], language: ['c'])