Removed special error messages when removed options --exitcode-suppressions or --suppressions are used

This commit is contained in:
PKEuS 2015-11-15 10:03:20 +01:00
parent 80c89e7a38
commit 958f2ac091
1 changed files with 2 additions and 17 deletions

View File

@ -180,18 +180,9 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
} }
// Filter errors // Filter errors
else if (std::strncmp(argv[i], "--exitcode-suppressions", 23) == 0) { else if (std::strncmp(argv[i], "--exitcode-suppressions=", 24) == 0) {
std::string filename;
// exitcode-suppressions filename.txt
if (std::strcmp(argv[i], "--exitcode-suppressions") == 0) {
// Error message to be removed in 1.72
PrintMessage("cppcheck: '--exitcode-suppressions <file>' has been removed, use '--exitcode-suppressions=<file>' instead.");
return false;
}
// exitcode-suppressions=filename.txt // exitcode-suppressions=filename.txt
filename = 24 + argv[i]; std::string filename = 24 + argv[i];
std::ifstream f(filename.c_str()); std::ifstream f(filename.c_str());
if (!f.is_open()) { if (!f.is_open()) {
@ -232,12 +223,6 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
} }
} }
else if (std::strcmp(argv[i], "--suppressions") == 0) {
// Error message to be removed in 1.72
PrintMessage("cppcheck: '--suppressions' has been removed, use '--suppressions-list=<file>' instead.");
return false;
}
else if (std::strncmp(argv[i], "--suppress=", 11) == 0) { else if (std::strncmp(argv[i], "--suppress=", 11) == 0) {
std::string suppression = argv[i]+11; std::string suppression = argv[i]+11;
const std::string errmsg(_settings->nomsg.addSuppressionLine(suppression)); const std::string errmsg(_settings->nomsg.addSuppressionLine(suppression));