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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_files.empty()) {
|
if (_files.empty()) {
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
std::cout << "cppcheck: error: no files to check - all paths ignored." << std::endl;
|
std::cout << "cppcheck: error: no files to check - all paths ignored." << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CppCheckExecutor::check(int argc, const char* const argv[])
|
int CppCheckExecutor::check(int argc, const char* const argv[])
|
||||||
|
|
|
@ -1597,10 +1597,9 @@ void CheckBufferOverrun::checkInsecureCmdLineArgs()
|
||||||
|
|
||||||
std::size_t functions = symbolDatabase->functionScopes.size();
|
std::size_t functions = symbolDatabase->functionScopes.size();
|
||||||
for (std::size_t i = 0; i < functions; ++i) {
|
for (std::size_t i = 0; i < functions; ++i) {
|
||||||
const Scope * scope = symbolDatabase->functionScopes[i];
|
const Function * function = symbolDatabase->functionScopes[i]->function;
|
||||||
Function * j = scope->function;
|
if (function) {
|
||||||
if (j) {
|
const Token* tok = function->token;
|
||||||
const Token* tok = j->token;
|
|
||||||
|
|
||||||
// Get the name of the argv variable
|
// Get the name of the argv variable
|
||||||
unsigned int varid = 0;
|
unsigned int varid = 0;
|
||||||
|
|
Loading…
Reference in New Issue