unsigned division and char variable usage - moved checks to "--style"

This commit is contained in:
Daniel Marjamäki 2008-11-21 08:20:21 +00:00
parent 51e9d98a5f
commit 7f4cc495df
1 changed files with 3 additions and 2 deletions

View File

@ -200,11 +200,12 @@ void CppCheck::checkFile(const std::string &code, const char FileName[], unsigne
// Check for unsigned divisions where one operand is signed // Check for unsigned divisions where one operand is signed
// Very important to run it before 'SimplifyTokenList' // Very important to run it before 'SimplifyTokenList'
CheckOther checkOther( &_tokenizer, this ); CheckOther checkOther( &_tokenizer, this );
if ( _settings._checkCodingStyle )
checkOther.CheckUnsignedDivision(); checkOther.CheckUnsignedDivision();
// Give warning when using char variable as array index // Give warning when using char variable as array index
// Doesn't work on simplified token list ('unsigned') // Doesn't work on simplified token list ('unsigned')
if ( _settings._showAll ) if ( _settings._checkCodingStyle )
checkOther.CheckCharVariable(); checkOther.CheckCharVariable();