windows: disable C4200 directly in libusb.h

This commit is contained in:
Shawn Hoffman
2020-08-20 13:52:54 -07:00
parent 7705f7c1a3
commit 390f509bbf
4 changed files with 13 additions and 22 deletions

View File

@ -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