diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index c162eb880..c0cd4d57e 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -422,12 +422,7 @@ unsigned int __stdcall ThreadExecutor::threadProc(void *args) CppCheck fileChecker(*threadExecutor, false); fileChecker.settings() = threadExecutor->_settings; - LeaveCriticalSection(&threadExecutor->_fileSync); - for (;;) { - - EnterCriticalSection(&threadExecutor->_fileSync); - if (it == threadExecutor->_files.end()) { LeaveCriticalSection(&threadExecutor->_fileSync); return result; @@ -457,8 +452,6 @@ unsigned int __stdcall ThreadExecutor::threadProc(void *args) CppCheckExecutor::reportStatus(threadExecutor->_processedFiles, threadExecutor->_totalFiles, threadExecutor->_processedSize, threadExecutor->_totalFileSize); LeaveCriticalSection(&threadExecutor->_reportSync); } - - LeaveCriticalSection(&threadExecutor->_fileSync); }; #ifdef _MSC_VER #pragma warning(push) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 3bd02041a..2a46bf593 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1154,7 +1154,7 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable() } /** @todo false negatives: this may be too conservative */ - if (!var || var->typeEndToken()->str() != "*" || var->typeStartToken()->next() != var->typeEndToken()) + if (!var || !var->isPointer() || var->typeStartToken()->next() != var->typeEndToken()) continue; // get name of variable