X Tutup
Skip to content

Commit fe0bd8f

Browse files
committed
Renamed exitcode to mExitCode
1 parent 6ff6f0a commit fe0bd8f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lib/cppcheck.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static TimerResults S_timerResults;
5454
static const CWE CWE398(398U); // Indicator of Poor Code Quality
5555

5656
CppCheck::CppCheck(ErrorLogger &errorLogger, bool useGlobalSuppressions)
57-
: mErrorLogger(errorLogger), exitcode(0), mUseGlobalSuppressions(useGlobalSuppressions), tooManyConfigs(false), mSimplify(true)
57+
: mErrorLogger(errorLogger), mExitCode(0), mUseGlobalSuppressions(useGlobalSuppressions), tooManyConfigs(false), mSimplify(true)
5858
{
5959
}
6060

@@ -107,14 +107,14 @@ unsigned int CppCheck::check(const ImportProject::FileSettings &fs)
107107

108108
unsigned int CppCheck::checkFile(const std::string& filename, const std::string &cfgname, std::istream& fileStream)
109109
{
110-
exitcode = 0;
110+
mExitCode = 0;
111111

112112
// only show debug warnings for accepted C/C++ source files
113113
if (!Path::acceptFile(filename))
114114
mSettings.debugwarnings = false;
115115

116116
if (mSettings.terminated())
117-
return exitcode;
117+
return mExitCode;
118118

119119
if (!mSettings.quiet) {
120120
std::string fixedpath = Path::simplifyPath(filename);
@@ -250,7 +250,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
250250
reportErr(errors.front());
251251
errors.pop_front();
252252
}
253-
return exitcode; // known results => no need to reanalyze file
253+
return mExitCode; // known results => no need to reanalyze file
254254
}
255255
}
256256

@@ -482,7 +482,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
482482
internalError(filename, e.what());
483483
} catch (const InternalError &e) {
484484
internalError(filename, e.errorMessage);
485-
exitcode=1; // e.g. reflect a syntax error
485+
mExitCode=1; // e.g. reflect a syntax error
486486
}
487487

488488
mAnalyzerInformation.setFileInfo("CheckUnusedFunctions", checkUnusedFunctions.analyzerInfo());
@@ -495,10 +495,10 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
495495
}
496496

497497
mErrorList.clear();
498-
if (internalErrorFound && (exitcode==0)) {
499-
exitcode=1;
498+
if (internalErrorFound && (mExitCode==0)) {
499+
mExitCode = 1;
500500
}
501-
return exitcode;
501+
return mExitCode;
502502
}
503503

504504
void CppCheck::internalError(const std::string &filename, const std::string &msg)
@@ -770,7 +770,7 @@ void CppCheck::reportErr(const ErrorLogger::ErrorMessage &msg)
770770
}
771771

772772
if (!mSettings.nofail.isSuppressed(errorMessage) && (mUseGlobalSuppressions || !mSettings.nomsg.isSuppressed(errorMessage)))
773-
exitcode = 1;
773+
mExitCode = 1;
774774

775775
mErrorList.push_back(errmsg);
776776

@@ -830,7 +830,7 @@ bool CppCheck::analyseWholeProgram()
830830
// Analyse the tokens
831831
for (std::list<Check *>::const_iterator it = Check::instances().begin(); it != Check::instances().end(); ++it)
832832
errors |= (*it)->analyseWholeProgram(mFileInfo, mSettings, *this);
833-
return errors && (exitcode > 0);
833+
return errors && (mExitCode > 0);
834834
}
835835

836836
void CppCheck::analyseWholeProgram(const std::string &buildDir, const std::map<std::string, std::size_t> &files)

lib/cppcheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class CPPCHECKLIB CppCheck : ErrorLogger {
213213
/** @brief Current preprocessor configuration */
214214
std::string mCurrentConfig;
215215

216-
unsigned int exitcode;
216+
unsigned int mExitCode;
217217

218218
bool mUseGlobalSuppressions;
219219

0 commit comments

Comments
 (0)
X Tutup