From 13606f0295a54b7b7e0447bc23d96f1f852b570c Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Sat, 10 Feb 2018 17:37:22 +0100 Subject: [PATCH] Clang : Exclude special code in release() to avoid warning --- Fwk/VizFwk/LibCore/cvfObject.inl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Fwk/VizFwk/LibCore/cvfObject.inl b/Fwk/VizFwk/LibCore/cvfObject.inl index 59bf9dbf38..25ea5cefec 100644 --- a/Fwk/VizFwk/LibCore/cvfObject.inl +++ b/Fwk/VizFwk/LibCore/cvfObject.inl @@ -87,8 +87,9 @@ inline int Object::release() const { // Release on a NULL object ok, just return 0 // This is symmetric with being able to call delete on a NULL pointer +#ifndef __clang__ if (!this) return 0; - +#endif CVF_TIGHT_ASSERT(m_refCount > 0); if (--m_refCount == 0)