diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 820e77620..189d0f1c7 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -215,7 +215,7 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin if (_settings._errorsOnly == false && it != configurations.begin()) { std::string fixedpath = Path::simplifyPath(filename); fixedpath = Path::toNativeSeparators(fixedpath); - _errorLogger.reportOut(std::string("Checking ") + fixedpath + ": " + cfg + std::string("...")); + _errorLogger.reportOut("Checking " + fixedpath + ": " + cfg + "..."); } if (!_settings.userDefines.empty()) { @@ -311,7 +311,7 @@ void CppCheck::analyseFile(std::istream &fin, const std::string &filename) // Tokenize.. Tokenizer tokenizer(&_settings, this); std::istringstream istr(code); - tokenizer.tokenize(istr, filename.c_str(), ""); + tokenizer.tokenize(istr, filename.c_str()); tokenizer.simplifyTokenList2(); // Analyse the tokens.. @@ -340,8 +340,6 @@ bool CppCheck::checkFile(const std::string &code, const char FileName[], std::se if (_settings._showtime != SHOWTIME_NONE) _tokenizer.setTimerResults(&S_timerResults); try { - bool result; - // Execute rules for "raw" code for (std::list::const_iterator it = _settings.rules.begin(); it != _settings.rules.end(); ++it) { if (it->tokenlist == "raw") { @@ -357,7 +355,7 @@ bool CppCheck::checkFile(const std::string &code, const char FileName[], std::se std::istringstream istr(code); Timer timer("Tokenizer::tokenize", _settings._showtime, &S_timerResults); - result = _tokenizer.tokenize(istr, FileName, cfg); + bool result = _tokenizer.tokenize(istr, FileName, cfg); timer.Stop(); if (_settings._force || _settings._maxConfigs > 1) { diff --git a/lib/library.cpp b/lib/library.cpp index a8fddffce..e434d3590 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -396,7 +396,7 @@ bool Library::isargvalid(const std::string &functionName, int argnr, const MathL return true; TokenList tokenList(0); std::istringstream istr(ac->valid + ','); - tokenList.createTokens(istr,""); + tokenList.createTokens(istr); for (Token *tok = tokenList.front(); tok; tok = tok->next()) { if (Token::Match(tok,"- %num%")) { tok->str("-" + tok->strAt(1)); diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 98e11554d..8a0d4df76 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1622,7 +1622,7 @@ bool Tokenizer::tokenizeCondition(const std::string &code) { std::istringstream istr(code); - if (!list.createTokens(istr, "")) { + if (!list.createTokens(istr)) { cppcheckError(0); return false; } diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 267d52ade..1bbf62f0c 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -3757,7 +3757,7 @@ private: Settings settings; Tokenizer tokenizer(&settings, this); std::istringstream istr(code); - tokenizer.tokenize(istr, "test.cpp", ""); + tokenizer.tokenize(istr, "test.cpp"); tokenizer.validate(); } @@ -3768,7 +3768,7 @@ private: Settings settings; Tokenizer tokenizer(&settings, this); std::istringstream istr(code); - tokenizer.tokenize(istr, "test.cpp", ""); + tokenizer.tokenize(istr, "test.cpp"); tokenizer.validate(); }