From 8bc67f452736a9a49a3fe1a5bbf521d553923fd4 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Fri, 3 Apr 2026 14:20:20 +1100 Subject: [PATCH] Prevent SonarCloud source code analysis warning --- src/main/cpp/threadspecificdata.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/cpp/threadspecificdata.cpp b/src/main/cpp/threadspecificdata.cpp index b4ad482b2..5f2f4e292 100644 --- a/src/main/cpp/threadspecificdata.cpp +++ b/src/main/cpp/threadspecificdata.cpp @@ -266,6 +266,7 @@ ThreadSpecificData* ThreadSpecificData::getCurrentData() return (ThreadSpecificData*) pData; #endif +#if !LOG4CXX_HAS_THREAD_LOCAL // Fallback implementation that is not expected to be used using TaggedData = std::pair; static std::list thread_id_map; @@ -277,6 +278,7 @@ ThreadSpecificData* ThreadSpecificData::getCurrentData() if (thread_id_map.end() == pThreadId) pThreadId = thread_id_map.emplace(thread_id_map.begin(), threadId, ThreadSpecificData()); return &pThreadId->second; +#endif } void ThreadSpecificData::recycle()