Skip to content

Commit

Permalink
Hide Wself-assign-overloaded and Wself-move unittest compilation warn…
Browse files Browse the repository at this point in the history
…ings

The warnings occured with the clang compiler
  • Loading branch information
HybridDog authored and sfan5 committed Sep 17, 2021
1 parent 6fedee1 commit d1e0f73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/unittest/test_irrptr.cpp
Expand Up @@ -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()};
Expand Down Expand Up @@ -129,3 +135,7 @@ void TestIrrPtr::testNullHandling()
UASSERT(!p2);
UASSERT(!p3);
}

#if defined(__clang__)
#pragma GCC diagnostic pop
#endif

0 comments on commit d1e0f73

Please sign in to comment.