THREADING_MODEL_WIN: Create a new CppCheck object for every file to be analysed in multi-thread mode. This fixes existing .a1 files not getting used due to changing hashes (caused by suppressions from previous files) and matches the behavior in THREADING_MODEL_FORK. (#3405)
This commit is contained in:
parent
8700d1b86d
commit
187d45a8df
|
@ -458,15 +458,15 @@ unsigned int __stdcall ThreadExecutor::threadProc(void *args)
|
|||
// guard static members of CppCheck against concurrent access
|
||||
EnterCriticalSection(&threadExecutor->mFileSync);
|
||||
|
||||
CppCheck fileChecker(*threadExecutor, false, CppCheckExecutor::executeCommand);
|
||||
fileChecker.settings() = threadExecutor->mSettings;
|
||||
|
||||
for (;;) {
|
||||
if (itFile == threadExecutor->mFiles.end() && itFileSettings == threadExecutor->mSettings.project.fileSettings.end()) {
|
||||
LeaveCriticalSection(&threadExecutor->mFileSync);
|
||||
break;
|
||||
}
|
||||
|
||||
CppCheck fileChecker(*threadExecutor, false, CppCheckExecutor::executeCommand);
|
||||
fileChecker.settings() = threadExecutor->mSettings;
|
||||
|
||||
std::size_t fileSize = 0;
|
||||
if (itFile != threadExecutor->mFiles.end()) {
|
||||
const std::string &file = itFile->first;
|
||||
|
|
Loading…
Reference in New Issue