Mesa (master): meson: Add MSVC narrowing-int-to-char warnings
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 18 13:58:58 UTC 2020
Module: Mesa
Branch: master
Commit: 45f22528792d3ec072162aaff9b69a08bf1252e0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=45f22528792d3ec072162aaff9b69a08bf1252e0
Author: Daniel Stone <daniels at collabora.com>
Date: Mon Apr 6 21:35:09 2020 +0100
meson: Add MSVC narrowing-int-to-char warnings
MSVC seems quite keen to warn us that we're narrowing an int into a
char, even if it fits entirely within range.
Signed-off-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6227>
---
meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meson.build b/meson.build
index 88dcc8151ea..f7ed6c73af6 100644
--- a/meson.build
+++ b/meson.build
@@ -984,6 +984,8 @@ if cc.get_id() == 'msvc'
'/wd4146', # unary minus operator applied to unsigned type, result still unsigned
'/wd4200', # nonstandard extension used: zero-sized array in struct/union
'/wd4624', # destructor was implicitly defined as deleted [from LLVM]
+ '/wd4309', # 'initializing': truncation of constant value
+ '/wd4838', # conversion from 'int' to 'const char' requires a narrowing conversion
]
if cc.has_argument(a)
c_args += a
More information about the mesa-commit
mailing list