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();
switch (mSettings->library.getTypeCheck("unusedvar", typeName)) {
case Library::TypeCheck::def:
if (!mSettings->checkLibrary)
continue;
bailoutTypeName = typeName;
break;
case Library::TypeCheck::check:
@ -1231,9 +1229,9 @@ void CheckUnusedVar::checkFunctionVariableUsage()
Severity::information,
"checkLibraryCheckType",
"--check-library: Provide <type-checks><unusedvar> configuration for " + bailoutTypeName);
}
continue;
}
}
// warn
unreadVariableError(tok, expr->expressionString(), false);