Minor refactorings. rename token. cleanup if/else.
This commit is contained in:
parent
f717f4c6b8
commit
7342a81ea7
|
@ -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[])
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue