unsigned division and char variable usage - moved checks to "--style"
This commit is contained in:
parent
51e9d98a5f
commit
7f4cc495df
|
@ -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();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue