From 7f4cc495df1297cdbfcd75061f1ca4bc5467b32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 21 Nov 2008 08:20:21 +0000 Subject: [PATCH] unsigned division and char variable usage - moved checks to "--style" --- cppcheck.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cppcheck.cpp b/cppcheck.cpp index dc1a43932..0d3745bdf 100644 --- a/cppcheck.cpp +++ b/cppcheck.cpp @@ -200,11 +200,12 @@ void CppCheck::checkFile(const std::string &code, const char FileName[], unsigne // Check for unsigned divisions where one operand is signed // Very important to run it before 'SimplifyTokenList' CheckOther checkOther( &_tokenizer, this ); - checkOther.CheckUnsignedDivision(); + if ( _settings._checkCodingStyle ) + checkOther.CheckUnsignedDivision(); // Give warning when using char variable as array index // Doesn't work on simplified token list ('unsigned') - if ( _settings._showAll ) + if ( _settings._checkCodingStyle ) checkOther.CheckCharVariable();