forked from qt-creator/qt-creator
Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -55,7 +55,7 @@ BaseEditorDocumentParser::BaseEditorDocumentParser(const QString &filePath)
|
||||
: m_filePath(filePath)
|
||||
{
|
||||
static int meta = qRegisterMetaType<ProjectPartInfo>("CppTools::ProjectPartInfo");
|
||||
Q_UNUSED(meta);
|
||||
Q_UNUSED(meta)
|
||||
}
|
||||
|
||||
BaseEditorDocumentParser::~BaseEditorDocumentParser() = default;
|
||||
|
||||
@@ -1009,7 +1009,7 @@ void CppToolsPlugin::test_modelmanager_renameIncludes()
|
||||
struct ModelManagerGCHelper {
|
||||
~ModelManagerGCHelper() { CppModelManager::instance()->GC(); }
|
||||
} GCHelper;
|
||||
Q_UNUSED(GCHelper); // do not warn about being unused
|
||||
Q_UNUSED(GCHelper) // do not warn about being unused
|
||||
|
||||
TemporaryDir tmpDir;
|
||||
QVERIFY(tmpDir.isValid());
|
||||
@@ -1055,7 +1055,7 @@ void CppToolsPlugin::test_modelmanager_renameIncludesInEditor()
|
||||
struct ModelManagerGCHelper {
|
||||
~ModelManagerGCHelper() { CppModelManager::instance()->GC(); }
|
||||
} GCHelper;
|
||||
Q_UNUSED(GCHelper); // do not warn about being unused
|
||||
Q_UNUSED(GCHelper) // do not warn about being unused
|
||||
|
||||
TemporaryDir tmpDir;
|
||||
QVERIFY(tmpDir.isValid());
|
||||
|
||||
@@ -86,8 +86,8 @@ QString clangIncludeDirectory(const QString &clangVersion, const QString &clangR
|
||||
#ifndef UNIT_TESTS
|
||||
return Core::ICore::clangIncludeDirectory(clangVersion, clangResourceDirectory);
|
||||
#else
|
||||
Q_UNUSED(clangVersion);
|
||||
Q_UNUSED(clangResourceDirectory);
|
||||
Q_UNUSED(clangVersion)
|
||||
Q_UNUSED(clangResourceDirectory)
|
||||
return CLANG_RESOURCE_DIR;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user