summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-10-30 12:09:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-10-30 17:38:07 +0100
commitcee0a8b26340097807afc1939d296cbf9e0be428 (patch)
tree3f1aa1d39834a9b763da104943c821cd67c844bf /i18nlangtag
parent86f0d88025262b0cfb519545ae7956f6ecea16f9 (diff)
tsan:data race in LanguageTag::registerImpl
not important, just reduces noise when running tsan Change-Id: I96de4f9e70c8165f0c1135e24ae7522266aa0c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158651 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index b57186d49367..ebf31acc4f9a 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -20,6 +20,7 @@
#include <rtl/locale.h>
#include <o3tl/string_view.hxx>
#include <algorithm>
+#include <atomic>
#include <map>
#include <mutex>
#include <string_view>
@@ -759,7 +760,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
ImplPtr pImpl;
#if OSL_DEBUG_LEVEL > 0
- static size_t nCalls = 0;
+ static std::atomic_int nCalls = 0;
++nCalls;
SAL_INFO( "i18nlangtag", "LanguageTag::registerImpl: " << nCalls << " calls");
#endif