Fix -Wmaybe-uninitialized warnings
Fixes few of these, for example: qurlrecode.cpp:308:19: warning: 'ucs4' may be used uninitialized in this function [-Wmaybe-uninitialized] *output++ = ucs4; Change-Id: Iaf09fa854102c76b51e6e18556c5ef20212e57cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>bb10
parent
151323b94b
commit
cc6677a6c7
|
|
@ -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<QUrlUtf8Traits>(decoded, dst, src, end);
|
||||
if (charsNeeded < 0)
|
||||
|
|
|
|||
|
|
@ -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<QUtf8BaseTraits>(b, output, src1, end1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue