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/
This commit is contained in:
Dmitry Tsarevich 2020-05-07 01:30:32 +03:00
parent e361a6dc0f
commit 07729834ba
No known key found for this signature in database
GPG Key ID: E3C61298FF5B1274
1 changed files with 2 additions and 1 deletions

View File

@ -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_