From d6d34eb7bc78dbbc03484b8c98971af1b251297e Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Mon, 2 May 2022 22:48:37 -0400 Subject: [PATCH] WiVICommandPacket: Only disable warnings for MSVC This addresses a warning in GCC and Clang --- include/icsneo/communication/packet/wivicommandpacket.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/icsneo/communication/packet/wivicommandpacket.h b/include/icsneo/communication/packet/wivicommandpacket.h index c14080f..54d49d8 100644 --- a/include/icsneo/communication/packet/wivicommandpacket.h +++ b/include/icsneo/communication/packet/wivicommandpacket.h @@ -9,9 +9,11 @@ #include #pragma pack(push,2) +#ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union #pragma warning(disable: 4200) // nonstandard extension used: zero-sized array in struct/union +#endif // _MSC_VER namespace icsneo { @@ -146,7 +148,9 @@ struct CommandPacket { } // namespace icsneo +#ifdef _MSC_VER #pragma warning(pop) +#endif // _MSC_VER #pragma pack(pop) #endif // __cplusplus