Fixed Cppcheck warning

This commit is contained in:
Daniel Marjamäki 2020-05-09 14:45:47 +02:00
parent 137f262300
commit 9f76fcf5f1
1 changed files with 12 additions and 4 deletions

View File

@ -215,15 +215,23 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
mSettings = &settings;
if (!parseFromArgs(&cppCheck, argc, argv)) {
mSettings = nullptr;
return EXIT_FAILURE;
}
if (Settings::terminated()) {
mSettings = nullptr;
return EXIT_SUCCESS;
}
if (cppCheck.settings().exceptionHandling) {
return check_wrapper(cppCheck, argc, argv);
}
return check_internal(cppCheck, argc, argv);
int ret;
if (cppCheck.settings().exceptionHandling)
ret = check_wrapper(cppCheck, argc, argv);
else
ret = check_internal(cppCheck, argc, argv);
mSettings = nullptr;
return ret;
}
void CppCheckExecutor::setSettings(const Settings &settings)