From 1e9f67936e437a7ff8df0f58acebc94a619a0a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 29 Dec 2020 12:43:21 +0100 Subject: [PATCH] Cppcheck: Fix; Do not run clang twice --- lib/cppcheck.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index c069917ce..28ca0a7fd 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -419,10 +419,8 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs) temp.mSettings.platform(fs.platformType); if (mSettings.clang) { temp.mSettings.includePaths.insert(temp.mSettings.includePaths.end(), fs.systemIncludePaths.cbegin(), fs.systemIncludePaths.cend()); - temp.check(Path::simplifyPath(fs.filename)); + return temp.check(Path::simplifyPath(fs.filename)); } - if (mSettings.clang) - return temp.check(fs.filename); std::ifstream fin(fs.filename); unsigned int returnValue = temp.checkFile(Path::simplifyPath(fs.filename), fs.cfg, fin); mSettings.nomsg.addSuppressions(temp.mSettings.nomsg.getSuppressions());