CheckUnusedVar: Assume that assignment has 'standard behavior' by default

This commit is contained in:
Daniel Marjamäki 2019-11-17 12:33:26 +01:00
parent f5e3dc9a38
commit d0daf1f90d
1 changed files with 1 additions and 3 deletions

View File

@ -1206,8 +1206,6 @@ void CheckUnusedVar::checkFunctionVariableUsage()
const std::string typeName = op1Var->getTypeName(); const std::string typeName = op1Var->getTypeName();
switch (mSettings->library.getTypeCheck("unusedvar", typeName)) { switch (mSettings->library.getTypeCheck("unusedvar", typeName)) {
case Library::TypeCheck::def: case Library::TypeCheck::def:
if (!mSettings->checkLibrary)
continue;
bailoutTypeName = typeName; bailoutTypeName = typeName;
break; break;
case Library::TypeCheck::check: case Library::TypeCheck::check:
@ -1231,8 +1229,8 @@ void CheckUnusedVar::checkFunctionVariableUsage()
Severity::information, Severity::information,
"checkLibraryCheckType", "checkLibraryCheckType",
"--check-library: Provide <type-checks><unusedvar> configuration for " + bailoutTypeName); "--check-library: Provide <type-checks><unusedvar> configuration for " + bailoutTypeName);
continue;
} }
continue;
} }
// warn // warn