summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins@kdab.com>2018-11-29 17:40:10 +0000
committerSérgio Martins <sergio.martins@kdab.com>2018-11-30 10:06:55 +0000
commit7e6ede9d5dbcc8f4c879d0dc467267ebd4610f7e (patch)
tree97d3fd89962def0585c2cc7792d58c3fc1002617 /tools
parent2752a4632e94e2687655087d0d7f98b6b16e16a9 (diff)
Fix warnings about unused Qt containers
Fixes -Wclazy-unused-non-trivial warnings, in preparation for using gcc/clang's warn_unused attribute in all containers. Maintainers please check if some unused variable isn't hidding an actual bug. Change-Id: I83c5a11aa2328db3dce4c6c402295d86ef297c83 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlcachegen/generateloader.cpp2
-rw-r--r--tools/qmlplugindump/main.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/tools/qmlcachegen/generateloader.cpp b/tools/qmlcachegen/generateloader.cpp
index 3d2f35617f..de79576d67 100644
--- a/tools/qmlcachegen/generateloader.cpp
+++ b/tools/qmlcachegen/generateloader.cpp
@@ -345,7 +345,7 @@ bool generateLoader(const QStringList &compiledFiles, const QString &outputFileN
for (int i = 0; i < compiledFiles.count(); ++i) {
const QString compiledFile = compiledFiles.at(i);
const QString ns = symbolNamespaceForPath(compiledFile);
- stream << "namespace " << symbolNamespaceForPath(compiledFile) << " { \n";
+ stream << "namespace " << ns << " { \n";
stream << " extern const unsigned char qmlData[];\n";
stream << " const QQmlPrivate::CachedQmlUnit unit = {\n";
stream << " reinterpret_cast<const QV4::CompiledData::Unit*>(&qmlData), nullptr, nullptr\n";
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 7ab42e9a26..565152d5d2 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -1138,8 +1138,7 @@ int main(int argc, char *argv[])
QRegularExpressionMatchIterator i = re.globalMatch(merge[1]);
while (i.hasNext()) {
QRegularExpressionMatch m = i.next();
- QString d = m.captured(1);
- mergeDependencies << m.captured(1);
+ mergeDependencies << m.captured(1);
}
mergeComponents = merge [2];
}