Main: More checks are only done when the '-w' flag is given.

This commit is contained in:
Daniel Marjamäki 2007-06-08 18:01:23 +00:00
parent 7801d262a2
commit bc70635e10
1 changed files with 12 additions and 15 deletions

View File

@ -93,14 +93,13 @@ static void CppCheck(const char FileName[])
CheckBufferOverrun();
// Check that all private functions are called.
// Temporarily inactivated to avoid any false positives
CheckUnusedPrivateFunctions();
// Warnings
if (ShowWarnings)
{
// Check that all private functions are called.
CheckUnusedPrivateFunctions();
// Found implementation in header
WarningHeaderWithImplementation();
@ -118,26 +117,24 @@ static void CppCheck(const char FileName[])
// Check that all class constructors are ok.
// Temporarily inactivated to avoid any false positives
//CheckConstructors();
// if (a) delete a;
WarningRedundantCode();
// if (condition);
WarningIf();
// Dangerous usage of strtok
WarningStrTok();
}
// if (a) delete a;
WarningRedundantCode();
// if (condition);
WarningIf();
// Dangerous functions, such as 'gets' and 'scanf'
WarningDangerousFunctions();
// Invalid function usage..
InvalidFunctionUsage();
// Dangerous usage of strtok
WarningStrTok();
// Clean up tokens..
DeallocateTokens();
}