diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-10 14:36:57 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-11 10:00:01 -0700 |
| commit | b881ca8f4efe029bf1f5ecf50d89fa954ff66abf (patch) | |
| tree | 977f8e17a2396d6db1662731baf89d257e005c61 /src/qmlcompiler/qqmljslogger.cpp | |
| parent | daa653a153d0b8adb1bec61064d52d09bd052389 (diff) | |
Re-workaround the maybe-uninitialized warning from GCC 11+
It's still happening with GCC 13.
My guess is that the includes changed so the disabling wasn't applying.
Amends 067d5a3334558c378dd67246e26cce78650e78cc.
Pick-to: 6.5 6.6
Change-Id: I80612a7d275c41f1baf0fffd177a234b8fd398e1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljslogger.cpp')
| -rw-r--r-- | src/qmlcompiler/qqmljslogger.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/qmlcompiler/qqmljslogger.cpp b/src/qmlcompiler/qqmljslogger.cpp index c1ec4db266..07df647490 100644 --- a/src/qmlcompiler/qqmljslogger.cpp +++ b/src/qmlcompiler/qqmljslogger.cpp @@ -1,6 +1,16 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +#include <QtCore/qcompilerdetection.h> +// GCC 11 thinks diagMsg.fixSuggestion.fixes.d.ptr is somehow uninitialized in +// QList::emplaceBack(), probably called from QQmlJsLogger::log() +// Ditto for GCC 12, but it emits a different warning +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wuninitialized") +QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized") +#include <QtCore/qlist.h> +QT_WARNING_POP + #include <private/qqmljslogger_p.h> #include <private/qqmlsa_p.h> @@ -10,14 +20,6 @@ #include <QtCore/qfile.h> #include <QtCore/qfileinfo.h> -// GCC 11 thinks diagMsg.fixSuggestion.fixes.d.ptr is somehow uninitialized in -// QList::emplaceBack(), probably called from QQmlJsLogger::log() -// Ditto for GCC 12, but it emits a different warning -QT_WARNING_PUSH -QT_WARNING_DISABLE_GCC("-Wuninitialized") -QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized") -#include <QtCore/qlist.h> -QT_WARNING_POP QT_BEGIN_NAMESPACE |
