api: header: silence MSVC warnings for MSVC only

MinGW ignores unknown `#pragma warning` lines, but displays a warning
nevertheless.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2021-12-03 09:17:19 +01:00
parent 6187c95d56
commit c2315570e0

View File

@ -30,8 +30,10 @@ extern "C" {
# define _Post_maybenull_ # define _Post_maybenull_
#endif #endif
#pragma warning(push) #if defined(_MSC_VER)
#pragma warning(disable : 4324) /* structure was padded due to alignment specifier */ # pragma warning(push)
# pragma warning(disable : 4324) /* structure was padded due to alignment specifier */
#endif
/** /**
* A handle representing Wintun adapter * A handle representing Wintun adapter
@ -263,7 +265,9 @@ BYTE *(WINAPI WINTUN_ALLOCATE_SEND_PACKET_FUNC)(_In_ WINTUN_SESSION_HANDLE Sessi
*/ */
typedef VOID(WINAPI WINTUN_SEND_PACKET_FUNC)(_In_ WINTUN_SESSION_HANDLE Session, _In_ const BYTE *Packet); typedef VOID(WINAPI WINTUN_SEND_PACKET_FUNC)(_In_ WINTUN_SESSION_HANDLE Session, _In_ const BYTE *Packet);
#pragma warning(pop) #if defined(_MSC_VER)
# pragma warning(pop)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }