diff options
author | David Robillard <d@drobilla.net> | 2024-12-02 22:25:56 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-12-02 22:25:56 -0500 |
commit | 5af9d9a0bff772f232d8a232a138c903ca5ba100 (patch) | |
tree | 4c9e0f0cef993fb61a64d6319b883eac09ff9fe2 /meson.build | |
parent | 317de4a5292a47da655dd0ca297354b3f588e6e6 (diff) | |
download | jalv-5af9d9a0bff772f232d8a232a138c903ca5ba100.tar.gz jalv-5af9d9a0bff772f232d8a232a138c903ca5ba100.tar.bz2 jalv-5af9d9a0bff772f232d8a232a138c903ca5ba100.zip |
Refine MSVC warning suppressions
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/meson.build b/meson.build index f05b8e7..b92ab64 100644 --- a/meson.build +++ b/meson.build @@ -120,8 +120,6 @@ elif cc.get_id() == 'msvc' '/wd4191', # unsafe function conversion '/wd4200', # zero-sized array in struct/union '/wd4242', # possible loss of data from float conversion - '/wd4244', # possible loss of data from integer conversion - '/wd4267', # possible loss of data from size conversion '/wd4365', # signed/unsigned mismatch '/wd4514', # unreferenced inline function has been removed '/wd4668', # not defined as a preprocessor macro @@ -130,10 +128,22 @@ elif cc.get_id() == 'msvc' '/wd4711', # function selected for automatic inline expansion '/wd4800', # implicit conversion from int to bool '/wd4820', # padding added after construct - '/wd4996', # POSIX name for this item is deprecated '/wd5045', # compiler will insert Spectre mitigation ] endif + + if warning_level in ['everything', '3', '2'] + c_suppressions += [ + '/wd4267', # possible loss of data from size conversion + '/wd4996', # POSIX name for this item is deprecated + ] + endif + + if warning_level in ['everything', '3', '2', '1'] + c_suppressions += [ + '/wd4244', # conversion from unsigned long to float + ] + endif endif c_suppressions = cc.get_supported_arguments(c_suppressions) |