diff options
author | Julien Schueller <schueller@phimeca.com> | 2020-09-26 09:52:20 +0200 |
---|---|---|
committer | Julien Schueller <schueller@phimeca.com> | 2020-09-26 11:40:21 +0200 |
commit | cc6677a6c72677fb39fa08e2c97aeb262fd9abc7 (patch) | |
tree | af8d92e24a88dfc7b825b9310b624716720670ce /src/corelib/io | |
parent | 151323b94b20fe2be520e552e995d5e476a788f4 (diff) |
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>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qurlrecode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QUrlUtf8Traits>(decoded, dst, src, end); if (charsNeeded < 0) |