Minor refactorings. rename token. cleanup if/else.

This commit is contained in:
Dmitry-Me 2014-09-02 16:10:51 +02:00 committed by Daniel Marjamäki
parent f717f4c6b8
commit 7342a81ea7
2 changed files with 5 additions and 7 deletions

View File

@ -158,12 +158,11 @@ bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* c
return false;
}
if (!_files.empty()) {
return true;
} else {
if (_files.empty()) {
std::cout << "cppcheck: error: no files to check - all paths ignored." << std::endl;
return false;
}
return true;
}
int CppCheckExecutor::check(int argc, const char* const argv[])

View File

@ -1597,10 +1597,9 @@ void CheckBufferOverrun::checkInsecureCmdLineArgs()
std::size_t functions = symbolDatabase->functionScopes.size();
for (std::size_t i = 0; i < functions; ++i) {
const Scope * scope = symbolDatabase->functionScopes[i];
Function * j = scope->function;
if (j) {
const Token* tok = j->token;
const Function * function = symbolDatabase->functionScopes[i]->function;
if (function) {
const Token* tok = function->token;
// Get the name of the argv variable
unsigned int varid = 0;