Minor updates. Make sure there is no doublechecking. Don't perform certain checks upon c-files.

This commit is contained in:
Daniel Marjamäki 2007-05-10 17:25:52 +00:00
parent ad75792512
commit 0fd16be44b
1 changed files with 19 additions and 1 deletions

View File

@ -94,6 +94,8 @@ static void CppCheck(const char FileName[])
//WarningHeaderWithImplementation();
// Warning upon c-style pointer casts
const char *ext = strrchr(FileName, '.');
if (ext && stricmp(ext,".c"))
WarningOldStylePointerCast();
// Use standard functions instead
@ -159,6 +161,13 @@ void combine_2tokens(TOKEN *tok, const char str1[], const char str2[])
void Tokenize(const char FileName[])
{
// Has this file been tokenized already?
for (unsigned int i = 0; i < Files.size(); i++)
{
if ( stricmp(Files[i].c_str(), FileName) == 0 )
return;
}
std::ifstream fin(FileName);
if (!fin.is_open())
return;
@ -1106,6 +1115,13 @@ void WarningIncludeHeader()
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Redundant code..
//---------------------------------------------------------------------------
void WarningRedundantCode()
{
for (TOKEN *tok = tokens; tok; tok = tok->next)
@ -1149,3 +1165,5 @@ void WarningRedundantCode()
}
}