From 3aa55b5b9bd903f279e234304a2affd409b18e8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20V=C3=A4in=C3=B6l=C3=A4?= Date: Wed, 3 Oct 2018 16:03:46 +0300 Subject: [PATCH] Suppress Clang 7 self-assignment warnings Clang 7 warns on two intentional self-assignments. According to the release notes "the warning can be suppressed by adding *& to the right-hand side or casting it to the appropriate reference type." Component: Framework VK-GL-CTS issue: 1401 Change-Id: I3145b1965d46f617eb10ff8a60d038ce9bbb5cbf --- framework/delibs/decpp/deSharedPtr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/delibs/decpp/deSharedPtr.cpp b/framework/delibs/decpp/deSharedPtr.cpp index c2c90b4..f87fec1 100644 --- a/framework/delibs/decpp/deSharedPtr.cpp +++ b/framework/delibs/decpp/deSharedPtr.cpp @@ -179,7 +179,7 @@ void SharedPtr_selfTest (void) SharedPtr ptrA; SharedPtr ptrB; ptrB = ptrA; - ptrB = ptrB; + ptrB = *&ptrB; } // Basic test. @@ -235,7 +235,7 @@ void SharedPtr_selfTest (void) SharedPtr ptr(new Object(exists)); DE_TEST_ASSERT(exists); DE_TEST_ASSERT(ptr.get() != DE_NULL); - ptr = ptr; + ptr = *&ptr; } DE_TEST_ASSERT(!exists); } -- 2.7.4