summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/plugin/quuid.cpp2
-rw-r--r--src/gui/image/qicon.cpp2
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp2
-rw-r--r--src/network/access/qftp.cpp2
-rw-r--r--src/network/kernel/qhostinfo.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/qeglfsemulatorintegration.cpp2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 1a7073a069..0afce7fcf0 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -968,7 +968,7 @@ QUuid QUuid::createUuid()
if (!uuidseed.hasLocalData())
{
int *pseed = new int;
- static QBasicAtomicInt serial;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
qsrand(*pseed = QDateTime::currentSecsSinceEpoch()
+ quintptr(&pseed)
+ 2 + serial.fetchAndAddRelaxed(1));
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 0c3323636a..7d6cd50bac 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -99,7 +99,7 @@ QT_BEGIN_NAMESPACE
static int nextSerialNumCounter()
{
- static QBasicAtomicInt serial;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
return 1 + serial.fetchAndAddRelaxed(1);
}
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 75229ada6c..c1ea053204 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -91,7 +91,7 @@ static QImage rotated270(const QImage &src);
static int next_qimage_serial_number()
{
- static QBasicAtomicInt serial;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
return 1 + serial.fetchAndAddRelaxed(1);
}
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index 9a4527b4e6..556d52ef99 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
static int next_qopengltextureglyphcache_serial_number()
{
- static QBasicAtomicInt serial;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
return 1 + serial.fetchAndAddRelaxed(1);
}
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index 18c5a16cb5..e9cb3aa498 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -250,7 +250,7 @@ public:
static int nextId()
{
- static QBasicAtomicInt counter;
+ static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(0);
return 1 + counter.fetchAndAddRelaxed(1);
}
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index d3a1858f86..46123eb8a7 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -185,7 +185,7 @@ void emit_results_ready(const QHostInfo &hostInfo, const QObject *receiver,
static int nextId()
{
- static QBasicAtomicInt counter;
+ static QBasicAtomicInt counter = Q_BASIC_ATOMIC_INITIALIZER(0);
return 1 + counter.fetchAndAddRelaxed(1);
}
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index c1c5661da4..d5ce4efd1a 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
static int next_qgltextureglyphcache_serial_number()
{
- static QBasicAtomicInt serial;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
return 1 + serial.fetchAndAddRelaxed(1);
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/qeglfsemulatorintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/qeglfsemulatorintegration.cpp
index d0b4b5d5bd..1abc430da6 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/qeglfsemulatorintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/qeglfsemulatorintegration.cpp
@@ -127,7 +127,7 @@ EGLNativeWindowType QEglFSEmulatorIntegration::createNativeWindow(QPlatformWindo
// Let the emulator know which screen the window surface is attached to
setDisplay(screen->id());
}
- static QBasicAtomicInt uniqueWindowId;
+ static QBasicAtomicInt uniqueWindowId = Q_BASIC_ATOMIC_INITIALIZER(0);
return EGLNativeWindowType(qintptr(1 + uniqueWindowId.fetchAndAddRelaxed(1)));
}