Use GTEST_DISABLE_MSC_WARNINGS macros to disable warnings

Prior to this change we had a mixture of pragmas and
GTEST_DISABLE_MSC_WARNINGS; this change consolidates all instances
to use the macros.

PiperOrigin-RevId: 505786926
Change-Id: I2be8f6304387393995081af42ed32c2ad1bba5a7
This commit is contained in:
Tom Hughes
2023-01-30 13:44:59 -08:00
committed by Copybara-Service
parent f1c05d4544
commit 4fb7039fda
17 changed files with 72 additions and 149 deletions

View File

@@ -423,10 +423,7 @@ TEST(LinkTest, TestThrow) {
// the macro definition, as the warnings are generated when the macro
// is expanded and macro expansion cannot contain #pragma. Therefore
// we suppress them here.
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4100)
#endif
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4100)
// Tests the linkage of actions created using ACTION macro.
namespace {
@@ -459,9 +456,7 @@ ACTION_P2(ReturnEqualsEitherOf, first, second) {
}
} // namespace
#ifdef _MSC_VER
#pragma warning(pop)
#endif
GTEST_DISABLE_MSC_WARNINGS_POP_() // 4100
TEST(LinkTest, TestActionP2Macro) {
Mock mock;