From c77261ee218f2364fff3d2dc97d6cbaa862ba69d Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 28 Jun 2014 00:10:51 +0200 Subject: Fix data race on static int. --- src/core/kconfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/kconfig.cpp') diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 484a9a97..14a5d39c 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -63,7 +63,7 @@ KConfigPrivate::KConfigPrivate(KConfig::OpenFlags flags, { sGlobalFileName = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1String("/kdeglobals"); - static int use_etc_kderc = -1; + static QBasicAtomicInt use_etc_kderc = Q_BASIC_ATOMIC_INITIALIZER(-1); if (use_etc_kderc < 0) { use_etc_kderc = !qEnvironmentVariableIsSet("KDE_SKIP_KDERC"); // for unit tests } -- cgit v1.2.1