diff options
author | Tim Blechmann <tim@klingt.org> | 2022-10-06 19:24:47 +0800 |
---|---|---|
committer | Tim Blechmann <tim@klingt.org> | 2022-11-16 11:08:08 +0000 |
commit | e689fe5be90e1ad463e816968d79d75651879200 (patch) | |
tree | ae9c164e33b34743f445023f7c6fcbd6957a2c02 | |
parent | 88d173336e422b7241508c085f2c236e70955da7 (diff) |
tooling: silence -Wmissing-variable-declarations
silence clang's -Wmissing-variable-declarations
Change-Id: I40189c219bfeaeba103a56a08e489b019e2905bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 6b03bc92739d7ae5f38093162ec9d2ca25ff8906)
-rw-r--r-- | src/qmlcompiler/qqmljscompiler.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljscompiler.cpp b/src/qmlcompiler/qqmljscompiler.cpp index c69b272d35..60ed80823e 100644 --- a/src/qmlcompiler/qqmljscompiler.cpp +++ b/src/qmlcompiler/qqmljscompiler.cpp @@ -509,7 +509,8 @@ bool qSaveQmlJSUnitAsCpp(const QString &inputFileName, const QString &outputFile if (!writeStr(qQmlJSSymbolNamespaceForPath(inputFileName).toUtf8())) return false; - if (!writeStr(QByteArrayLiteral(" {\nextern const unsigned char qmlData alignas(16) [] = {\n"))) + if (!writeStr(QByteArrayLiteral(" {\nextern const unsigned char qmlData alignas(16) [];\n" + "extern const unsigned char qmlData alignas(16) [] = {\n"))) return false; unit.saveToDisk<uchar>([&writeStr](const uchar *begin, quint32 size) { @@ -549,10 +550,12 @@ bool qSaveQmlJSUnitAsCpp(const QString &inputFileName, const QString &outputFile writeStr(aotFunctions[FileScopeCodeIndex].code.toUtf8().constData()); if (aotFunctions.size() <= 1) { // FileScopeCodeIndex is always there, but it may be the only one. - writeStr("extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[] = { { 0, QMetaType::fromType<void>(), {}, nullptr } };"); + writeStr("extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[];\n" + "extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[] = { { 0, QMetaType::fromType<void>(), {}, nullptr } };"); } else { writeStr(wrapCallCode); - writeStr("extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[] = {\n"); + writeStr("extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[];\n" + "extern const QQmlPrivate::AOTCompiledFunction aotBuiltFunctions[] = {\n"); QString footer = QStringLiteral("});}\n"); |