Buffer overrun: Moved the "buffer overrun" and "array index out of bounds" to "--all" because there were false positives

This commit is contained in:
Daniel Marjamäki 2009-01-03 15:22:53 +00:00
parent 6850441c4a
commit 2f9c73ce82
1 changed files with 6 additions and 4 deletions

View File

@ -263,14 +263,13 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
if ( _settings._checkFunctionUsage )
_checkFunctionUsage.parseTokens(_tokenizer);
// Class for detecting buffer overruns and related problems
CheckBufferOverrunClass checkBufferOverrun( &_tokenizer, _settings, this );
// Memory leak
CheckMemoryLeakClass checkMemoryLeak( &_tokenizer, _settings, this );
checkMemoryLeak.CheckMemoryLeak();
// Buffer overruns..
CheckBufferOverrunClass checkBufferOverrun( &_tokenizer, _settings, this );
checkBufferOverrun.bufferOverrun();
// Check that all class constructors are ok.
checkClass.constructors();
@ -279,6 +278,9 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
if (_settings._showAll)
{
// Buffer overruns..
checkBufferOverrun.bufferOverrun();
// Check for "if (a=b)"
checkOther.CheckIfAssignment();