nir: Fixes MSVC compiling error about unused variable _
Fixes: 836470d433
("nir: allow NIR_PASS(_, )")
MSVC compiling error:
```
nir/nir_lower_shader_calls.c
../mesa/src/compiler/nir/nir_lower_shader_calls.c(1188): error C2220: the following warning is treated as an error
../mesa/src/compiler/nir/nir_lower_shader_calls.c(1188): warning C4101: '_': unreferenced local variable
../mesa/src/compiler/nir/nir_lower_shader_calls.c(1190): warning C4101: '_': unreferenced local variable
```
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16666>
This commit is contained in:
@@ -299,6 +299,8 @@ do { \
|
||||
*/
|
||||
#ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
|
||||
#define UNUSED __attribute__((unused))
|
||||
#elif defined (_MSC_VER)
|
||||
#define UNUSED __pragma(warning(suppress:4100 4101))
|
||||
#else
|
||||
#define UNUSED
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user