diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index 3142062665..0cead3a8b7 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -70,7 +70,7 @@ public: } }; - constexpr QUuid() noexcept {} + constexpr QUuid() noexcept : data1(0), data2(0), data3(0), data4{0,0,0,0,0,0,0,0} {} constexpr QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) noexcept @@ -183,10 +183,10 @@ public: NSUUID *toNSUUID() const Q_DECL_NS_RETURNS_AUTORELEASED; #endif - uint data1 = 0; - ushort data2 = 0; - ushort data3 = 0; - uchar data4[8] = {}; + uint data1; + ushort data2; + ushort data3; + uchar data4[8]; private: static constexpr Id128Bytes bswap(Id128Bytes b) @@ -244,6 +244,7 @@ inline QUuid QUuid::fromBytes(const void *bytes, QSysInfo::Endian order) noexcep #ifdef __SIZEOF_INT128__ constexpr inline QUuid::QUuid(quint128 uuid, QSysInfo::Endian order) noexcept + : QUuid() { if (order == QSysInfo::LittleEndian) uuid = qbswap(uuid);