diff --git a/src/corelib/io/qurlrecode.cpp b/src/corelib/io/qurlrecode.cpp index 2ac335cf5c..44e0a8239d 100644 --- a/src/corelib/io/qurlrecode.cpp +++ b/src/corelib/io/qurlrecode.cpp @@ -294,7 +294,7 @@ struct QUrlUtf8Traits : public QUtf8BaseTraitsNoAscii static bool encodedUtf8ToUtf16(QString &result, ushort *&output, const ushort *begin, const ushort *&input, const ushort *end, ushort decoded) { - uint ucs4, *dst = &ucs4; + uint ucs4 = 0, *dst = &ucs4; const ushort *src = input + 3;// skip the %XX that yielded \a decoded int charsNeeded = QUtf8Functions::fromUtf8(decoded, dst, src, end); if (charsNeeded < 0) diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 422e1f8419..b05a3cd707 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -886,7 +886,7 @@ static int ucstricmp8(const char *utf8, const char *utf8end, const QChar *utf16, QStringIterator src2(utf16, utf16end); while (src1 < end1 && src2.hasNext()) { - uint uc1; + uint uc1 = 0; uint *output = &uc1; uchar b = *src1++; int res = QUtf8Functions::fromUtf8(b, output, src1, end1);