From 390f509bbf7689c737cb8c6a5859839236449092 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 20 Aug 2020 13:52:54 -0700 Subject: [PATCH] windows: disable C4200 directly in libusb.h --- Externals/libusb/libusb/libusb.h | 7 +++++++ Source/Core/Core/Core.vcxproj | 16 ++++------------ Source/Core/InputCommon/InputCommon.vcxproj | 8 +------- Source/Core/UICommon/UICommon.vcxproj | 4 +--- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/Externals/libusb/libusb/libusb.h b/Externals/libusb/libusb/libusb.h index 8a6b0bfa9f..777250e47f 100644 --- a/Externals/libusb/libusb/libusb.h +++ b/Externals/libusb/libusb/libusb.h @@ -25,6 +25,9 @@ #define LIBUSB_H #ifdef _MSC_VER +#pragma warning(push) +/* Disable: warning C4200: nonstandard extension used : zero-sized array in struct/union */ +#pragma warning(disable:4200) /* on MS environments, the inline keyword is available in C++ only */ #if !defined(__cplusplus) #define inline __inline @@ -2059,6 +2062,10 @@ enum libusb_option { int LIBUSB_CALL libusb_set_option(libusb_context *ctx, enum libusb_option option, ...); +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #ifdef __cplusplus } #endif diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj index 89c294cf08..4880f03e47 100644 --- a/Source/Core/Core/Core.vcxproj +++ b/Source/Core/Core/Core.vcxproj @@ -211,15 +211,9 @@ - - 4200;%(DisableSpecificWarnings) - - - 4200;%(DisableSpecificWarnings) - - - 4200;%(DisableSpecificWarnings) - + + + @@ -232,9 +226,7 @@ - - 4200;%(DisableSpecificWarnings) - + diff --git a/Source/Core/InputCommon/InputCommon.vcxproj b/Source/Core/InputCommon/InputCommon.vcxproj index 1325ca0eab..51bf5e9661 100644 --- a/Source/Core/InputCommon/InputCommon.vcxproj +++ b/Source/Core/InputCommon/InputCommon.vcxproj @@ -50,13 +50,7 @@ - - - 4200;%(DisableSpecificWarnings) - + diff --git a/Source/Core/UICommon/UICommon.vcxproj b/Source/Core/UICommon/UICommon.vcxproj index ba1fe12067..1536f9b894 100644 --- a/Source/Core/UICommon/UICommon.vcxproj +++ b/Source/Core/UICommon/UICommon.vcxproj @@ -42,9 +42,7 @@ - - 4200;%(DisableSpecificWarnings) - +