From fe0bd8ff6cebd3efb0ccbd7090f7e705935a45d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 17 Jun 2018 07:43:25 +0200 Subject: [PATCH] Renamed exitcode to mExitCode --- lib/cppcheck.cpp | 20 ++++++++++---------- lib/cppcheck.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 3ea857434..a91944d33 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -54,7 +54,7 @@ static TimerResults S_timerResults; static const CWE CWE398(398U); // Indicator of Poor Code Quality CppCheck::CppCheck(ErrorLogger &errorLogger, bool useGlobalSuppressions) - : mErrorLogger(errorLogger), exitcode(0), mUseGlobalSuppressions(useGlobalSuppressions), tooManyConfigs(false), mSimplify(true) + : mErrorLogger(errorLogger), mExitCode(0), mUseGlobalSuppressions(useGlobalSuppressions), tooManyConfigs(false), mSimplify(true) { } @@ -107,14 +107,14 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs) unsigned int CppCheck::checkFile(const std::string& filename, const std::string &cfgname, std::istream& fileStream) { - exitcode = 0; + mExitCode = 0; // only show debug warnings for accepted C/C++ source files if (!Path::acceptFile(filename)) mSettings.debugwarnings = false; if (mSettings.terminated()) - return exitcode; + return mExitCode; if (!mSettings.quiet) { std::string fixedpath = Path::simplifyPath(filename); @@ -250,7 +250,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string reportErr(errors.front()); errors.pop_front(); } - return exitcode; // known results => no need to reanalyze file + return mExitCode; // known results => no need to reanalyze file } } @@ -482,7 +482,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string internalError(filename, e.what()); } catch (const InternalError &e) { internalError(filename, e.errorMessage); - exitcode=1; // e.g. reflect a syntax error + mExitCode=1; // e.g. reflect a syntax error } mAnalyzerInformation.setFileInfo("CheckUnusedFunctions", checkUnusedFunctions.analyzerInfo()); @@ -495,10 +495,10 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string } mErrorList.clear(); - if (internalErrorFound && (exitcode==0)) { - exitcode=1; + if (internalErrorFound && (mExitCode==0)) { + mExitCode = 1; } - return exitcode; + return mExitCode; } void CppCheck::internalError(const std::string &filename, const std::string &msg) @@ -770,7 +770,7 @@ void CppCheck::reportErr(const ErrorLogger::ErrorMessage &msg) } if (!mSettings.nofail.isSuppressed(errorMessage) && (mUseGlobalSuppressions || !mSettings.nomsg.isSuppressed(errorMessage))) - exitcode = 1; + mExitCode = 1; mErrorList.push_back(errmsg); @@ -830,7 +830,7 @@ bool CppCheck::analyseWholeProgram() // Analyse the tokens for (std::list::const_iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) errors |= (*it)->analyseWholeProgram(mFileInfo, mSettings, *this); - return errors && (exitcode > 0); + return errors && (mExitCode > 0); } void CppCheck::analyseWholeProgram(const std::string &buildDir, const std::map &files) diff --git a/lib/cppcheck.h b/lib/cppcheck.h index 97e749f48..c8680dcd1 100644 --- a/lib/cppcheck.h +++ b/lib/cppcheck.h @@ -213,7 +213,7 @@ private: /** @brief Current preprocessor configuration */ std::string mCurrentConfig; - unsigned int exitcode; + unsigned int mExitCode; bool mUseGlobalSuppressions;