From 07729834ba9147c1540cfbeb7e102455f4961f36 Mon Sep 17 00:00:00 2001 From: Dmitry Tsarevich Date: Thu, 7 May 2020 01:30:32 +0300 Subject: [PATCH] lib: Use MSVC warning override scope pragma warning(default: X) sets the 'X' warning to the DEFAULT state. Correct way is disable warning for scope and restore it to state BEFORE the scope when it ends. See https://www.viva64.com/en/w/v665/print/ --- lib/msg_log.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/msg_log.h b/lib/msg_log.h index 191c374e32..c07e2f7439 100644 --- a/lib/msg_log.h +++ b/lib/msg_log.h @@ -75,6 +75,7 @@ protected: // See lib/msg_log.C for commentary // #if _MSC_VER >= 1300 +#pragma warning(push) #pragma warning(disable: 4512) // assignment operator could not be generated #endif @@ -94,7 +95,7 @@ public: }; #if _MSC_VER >= 1300 -#pragma warning(default: 4512) // assignment operator could not be generated +#pragma warning(pop) #endif #ifdef _USING_FCGI_