From d1e0f73b770165fbd889b8298dec79c83107862e Mon Sep 17 00:00:00 2001 From: HybridDog Date: Thu, 5 Mar 2020 14:11:58 +0100 Subject: [PATCH] Hide Wself-assign-overloaded and Wself-move unittest compilation warnings The warnings occured with the clang compiler --- src/unittest/test_irrptr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/unittest/test_irrptr.cpp b/src/unittest/test_irrptr.cpp index aa857ff46..3484f1514 100644 --- a/src/unittest/test_irrptr.cpp +++ b/src/unittest/test_irrptr.cpp @@ -91,6 +91,12 @@ void TestIrrPtr::testRefCounting() obj->getReferenceCount()); } +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wself-assign-overloaded" + #pragma GCC diagnostic ignored "-Wself-move" +#endif + void TestIrrPtr::testSelfAssignment() { irr_ptr p1{new IReferenceCounted()}; @@ -129,3 +135,7 @@ void TestIrrPtr::testNullHandling() UASSERT(!p2); UASSERT(!p3); } + +#if defined(__clang__) + #pragma GCC diagnostic pop +#endif