Skip to content

Commit 1e9f679

Browse files
committed
Cppcheck: Fix; Do not run clang twice
1 parent 7719b27 commit 1e9f679

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/cppcheck.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,8 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs)
419419
temp.mSettings.platform(fs.platformType);
420420
if (mSettings.clang) {
421421
temp.mSettings.includePaths.insert(temp.mSettings.includePaths.end(), fs.systemIncludePaths.cbegin(), fs.systemIncludePaths.cend());
422-
temp.check(Path::simplifyPath(fs.filename));
422+
return temp.check(Path::simplifyPath(fs.filename));
423423
}
424-
if (mSettings.clang)
425-
return temp.check(fs.filename);
426424
std::ifstream fin(fs.filename);
427425
unsigned int returnValue = temp.checkFile(Path::simplifyPath(fs.filename), fs.cfg, fin);
428426
mSettings.nomsg.addSuppressions(temp.mSettings.nomsg.getSuppressions());

0 commit comments

Comments
 (0)