From 0e1504fa521b6ad3b32ebe9458306e8e245fe18e Mon Sep 17 00:00:00 2001 From: Vighnesh Date: Fri, 11 Oct 2024 12:13:24 -0700 Subject: [PATCH] try a different syntax for disabling warnings --- tests/SharedCodeAllocator.test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/SharedCodeAllocator.test.cpp b/tests/SharedCodeAllocator.test.cpp index 0f30036d..8e8d526a 100644 --- a/tests/SharedCodeAllocator.test.cpp +++ b/tests/SharedCodeAllocator.test.cpp @@ -177,12 +177,13 @@ TEST_CASE("NativeModuleRefRefcounting") // NativeModuleRef self move assignment: { -#pragma warning(push, 0) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wself-move" NativeModuleRef modRef1{modRefA}; modRef1 = std::move(modRef1); REQUIRE(modRef1.get() == modRefA.get()); REQUIRE(modRefA->getRefcount() == 2); -#pragma warning(pop) +#pragma GCC diagnostic pop } REQUIRE(modRefA->getRefcount() == 1);