Refactoring; Avoid 'unsigned'

This commit is contained in:
Daniel Marjamäki 2020-12-27 21:05:31 +01:00
parent ef485f7d17
commit e7c462b827
3 changed files with 4 additions and 4 deletions

View File

@ -925,7 +925,7 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
mSettings->checkAllConfigurations = true;
if (mSettings->force)
mSettings->maxConfigs = ~0U;
mSettings->maxConfigs = INT_MAX;
else if ((def || mSettings->preprocessOnly) && !maxconfigs)
mSettings->maxConfigs = 1U;

View File

@ -641,7 +641,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
}
std::set<unsigned long long> checksums;
unsigned int checkCount = 0;
int checkCount = 0;
bool hasValidConfig = false;
std::list<std::string> configurationError;
for (const std::string &currCfg : configurations) {
@ -1259,7 +1259,7 @@ Settings &CppCheck::settings()
return mSettings;
}
void CppCheck::tooManyConfigsError(const std::string &file, const std::size_t numberOfConfigurations)
void CppCheck::tooManyConfigsError(const std::string &file, const int numberOfConfigurations)
{
if (!mSettings.isEnabled(Settings::INFORMATION) && !mTooManyConfigs)
return;

View File

@ -118,7 +118,7 @@ public:
*/
void getErrorMessages();
void tooManyConfigsError(const std::string &file, const std::size_t numberOfConfigurations);
void tooManyConfigsError(const std::string &file, const int numberOfConfigurations);
void purgedConfigurationMessage(const std::string &file, const std::string& configuration);
void dontSimplify() {