diff --git a/meson.build b/meson.build index 7f62618e8f2..bda3d736992 100644 --- a/meson.build +++ b/meson.build @@ -1137,6 +1137,7 @@ if cc.get_argument_syntax() == 'msvc' '/wd5105', # macro expansion producing 'defined' has undefined behavior (winbase.h, need Windows SDK upgrade) '/we4020', # Error when passing the wrong number of parameters '/we4024', # Error when passing different type of parameter + '/we4189', # 'identifier' : local variable is initialized but not referenced '/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++ on the command line ] c_args += cc.get_supported_arguments(_trial) diff --git a/src/amd/addrlib/meson.build b/src/amd/addrlib/meson.build index ebc3bbeceea..283650c6475 100644 --- a/src/amd/addrlib/meson.build +++ b/src/amd/addrlib/meson.build @@ -68,7 +68,7 @@ endif cpp_args_addrlib += cpp.get_supported_arguments( ['-Wno-unused-variable', '-Wno-unused-local-typedefs', '-Wno-unused-but-set-variable', '-Wno-maybe-uninitialized', - '-Wno-self-assign'] + '-Wno-self-assign', '/wd4189'] ) libamdgpu_addrlib = static_library( diff --git a/src/util/macros.h b/src/util/macros.h index 9eac3d25874..f3870d23b54 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -277,7 +277,7 @@ do { \ #ifdef HAVE_FUNC_ATTRIBUTE_UNUSED #define UNUSED __attribute__((unused)) #elif defined (_MSC_VER) -#define UNUSED __pragma(warning(suppress:4100 4101)) +#define UNUSED __pragma(warning(suppress:4100 4101 4189)) #else #define UNUSED #endif