From a352dee1f1321672f458b4d62197f04b197e5537 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 18 May 2021 00:11:57 +0100 Subject: [PATCH] Disable warnings inside winsock2.h when using MSVC too We already disabled the warnings inside windows.h, but since bf5090bcf3 (Enable Winsock 2 and IPv6 build options by default, 2021-04-24) we could get warnings from winsock2.h, so move its inclusion inside the region where the warnings were disabled too. For the record, the warnings were, rather surprisingly, C4668, which is disabled by default, but apparently was enabled somewhere inside (at least some versions of) SDK headers. This commit is best viewed with --color-moved git option. --- include/wx/msw/wrapwin.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/wx/msw/wrapwin.h b/include/wx/msw/wrapwin.h index 869cd470f0..3f7ae7d45f 100644 --- a/include/wx/msw/wrapwin.h +++ b/include/wx/msw/wrapwin.h @@ -27,6 +27,10 @@ #define NOMINMAX #endif // NOMINMAX +// Disable any warnings inside Windows headers. +#ifdef __VISUALC__ + #pragma warning(push, 1) +#endif // When the application wants to use (this is required for IPv6 // support, for example), we must include it before winsock.h, and as windows.h @@ -38,12 +42,8 @@ #ifndef _WINSOCK_DEPRECATED_NO_WARNINGS #define _WINSOCK_DEPRECATED_NO_WARNINGS #endif - #include -#endif -// Disable any warnings inside Windows headers. -#ifdef __VISUALC__ - #pragma warning(push, 1) + #include #endif #include