]> git.lizzy.rs Git - minetest.git/commitdiff
Hide Wself-assign-overloaded and Wself-move unittest compilation warnings
authorHybridDog <ovvv@web.de>
Thu, 5 Mar 2020 13:11:58 +0000 (14:11 +0100)
committersfan5 <sfan5@live.de>
Fri, 17 Sep 2021 16:13:04 +0000 (18:13 +0200)
The warnings occured with the clang compiler

src/unittest/test_irrptr.cpp

index aa857ff46fa828d9e66b4dd9265572c319503036..3484f1514fc3ee8e2c272a0ad3b2182e602d6dc2 100644 (file)
@@ -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<IReferenceCounted> p1{new IReferenceCounted()};
@@ -129,3 +135,7 @@ void TestIrrPtr::testNullHandling()
        UASSERT(!p2);
        UASSERT(!p3);
 }
+
+#if defined(__clang__)
+       #pragma GCC diagnostic pop
+#endif