From 44e857c0120ce92f589f6de70e90893e70226c98 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 19 Jul 2023 00:35:54 +0200 Subject: [PATCH] Explicitly disable some level 4 warnings in Windows SDK headers Some level 4 warnings are somehow not disabled by switching to level 1, so disable them explicitly. Closes #23716. --- include/wx/msw/wrapwin.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/wx/msw/wrapwin.h b/include/wx/msw/wrapwin.h index 6bda4c6a65..dd5ede5aa8 100644 --- a/include/wx/msw/wrapwin.h +++ b/include/wx/msw/wrapwin.h @@ -30,6 +30,18 @@ // Disable any warnings inside Windows headers. #ifdef __VISUALC__ #pragma warning(push, 1) + + // Some warnings, which are disabled by default but could be enabled by the + // application code before including wx headers, are somehow not disabled + // even by switching to warning level 1, so disable them explicitly. + + // expression before comma has no effect; expected expression with + // side-effect + #pragma warning(disable:4548) + + // 'symbol' is not defined as a preprocessor macro, replacing with '0' for + // 'directives' + #pragma warning(disable:4668) #endif // When the application wants to use (this is required for IPv6