From f14c2d6155e28d498bb1ed6a0ee4060e50422591 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Sat, 7 Feb 2009 15:37:01 +0000 Subject: [PATCH] Fixed partially ticket #81 (getting rid of compiler warnings) --- src/cppcheck.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/cppcheck.cpp b/src/cppcheck.cpp index 76df10cce..b3a9dbe28 100644 --- a/src/cppcheck.cpp +++ b/src/cppcheck.cpp @@ -422,13 +422,11 @@ void CppCheck::checkFile(const std::string &code, const char FileName[]) void CppCheck::reportErr(const std::string &errmsg) { - if (/*OnlyReportUniqueErrors*/ true) - { - if (std::find(_errorList.begin(), _errorList.end(), errmsg) != _errorList.end()) - return; - _errorList.push_back(errmsg); - } + // Alert only about unique errors + if (std::find(_errorList.begin(), _errorList.end(), errmsg) != _errorList.end()) + return; + _errorList.push_back(errmsg); std::string errmsg2(errmsg); if (_settings._verbose) { @@ -451,11 +449,11 @@ void CppCheck::reportXml(const std::string &file, const std::string &line, const { std::ostringstream xml; xml << ""; _xmllist.push_back(xml.str());