Fixed unusedFunctions warnings emmitted by cppcheck:

- Several tests in testcmdlineparser.cpp were never executed (failing tests commented)
- Unnecessary function in testmemleak.cpp removed.
This commit is contained in:
PKEuS 2012-08-01 11:18:03 -07:00
parent 88e4794d6e
commit 78bc4ddbad
2 changed files with 8 additions and 19 deletions

View File

@ -51,6 +51,14 @@ private:
TEST_CASE(defines);
TEST_CASE(defines2);
TEST_CASE(defines3);
//TEST_CASE(defines4);
//TEST_CASE(fileListStdin); // Hangs
TEST_CASE(ignorefilepaths1);
TEST_CASE(ignorefilepaths2);
//TEST_CASE(ignorepaths1);
//TEST_CASE(ignorepaths2);
//TEST_CASE(ignorepaths3);
//TEST_CASE(ignorepaths4);
TEST_CASE(includesnopath);
TEST_CASE(includes);
TEST_CASE(includesslash);

View File

@ -3125,25 +3125,6 @@ private:
}
void checkvcl(const char code[]) {
// Clear the error buffer..
errout.str("");
Settings settings;
settings.experimental = true;
// Tokenize..
Tokenizer tokenizer(&settings, this);
std::istringstream istr(code);
tokenizer.tokenize(istr, "test.cpp");
tokenizer.simplifyTokenList();
// Check for memory leaks..
CheckMemoryLeakInFunction checkMemoryLeak(&tokenizer, &settings, this);
checkMemoryLeak.check();
}
void class1() {
check("class Fred\n"
"{\n"