From e18cb8b535e742ef764353510867410316fffa6b Mon Sep 17 00:00:00 2001 From: Wang Wei Date: Mon, 7 Sep 2020 15:41:43 +0800 Subject: [PATCH] Initialize "uc1" variable remove warning for -Wmaybe-uninitialized. Change-Id: Ib17200eb86ee443875a9059b62762b2dc2100634 Reviewed-by: Lars Knoll --- src/corelib/text/qstringconverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index f961431dfd..84f293ae5f 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -852,7 +852,7 @@ int QUtf8::compareUtf8(const char *utf8, qsizetype u8len, const QChar *utf16, qs int QUtf8::compareUtf8(const char *utf8, qsizetype u8len, QLatin1String s) { - uint uc1; + uint uc1 = QChar::Null; auto src1 = reinterpret_cast(utf8); auto end1 = src1 + u8len; auto src2 = reinterpret_cast(s.latin1());