This is an automated email from the ASF dual-hosted git repository. swebb2066 pushed a commit to branch silence_sonar_cloud_analyser in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 8bc67f452736a9a49a3fe1a5bbf521d553923fd4 Author: Stephen Webb <[email protected]> AuthorDate: Fri Apr 3 14:20:20 2026 +1100 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 b4ad482b..5f2f4e29 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<std::thread::id, ThreadSpecificData>; static std::list<TaggedData> 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()
