Fix Cppcheck self check warnings

This commit is contained in:
Daniel Marjamäki 2021-02-01 19:31:30 +01:00
parent 986f658e39
commit dc63dd6ada
2 changed files with 5 additions and 5 deletions

View File

@ -568,15 +568,15 @@ void CheckClass::initVar(std::vector<Usage> &usageList, nonneg int varid)
}
}
void CheckClass::assignAllVar(std::vector<Usage> &usage)
void CheckClass::assignAllVar(std::vector<Usage> &usageList)
{
for (Usage & i : usage)
for (Usage & i : usageList)
i.assign = true;
}
void CheckClass::clearAllVar(std::vector<Usage> &usage)
void CheckClass::clearAllVar(std::vector<Usage> &usageList)
{
for (Usage & i : usage) {
for (Usage & i : usageList) {
i.assign = false;
i.init = false;
}

View File

@ -274,7 +274,7 @@ private:
// constructors helper function
/** @brief Information about a member variable. Used when checking for uninitialized variables */
struct Usage {
Usage(const Variable *var) : var(var), assign(false), init(false) { }
explicit Usage(const Variable *var) : var(var), assign(false), init(false) { }
/** Variable that this usage is for */
const Variable *var;