CheckClass: Fixed GCC warning
This commit is contained in:
parent
06c6e78be4
commit
9d195144ea
|
@ -873,11 +873,12 @@ void CheckClass::checkMemsetType(const Scope *start, const Token *tok, const Sco
|
||||||
std::list<Function>::const_iterator func;
|
std::list<Function>::const_iterator func;
|
||||||
|
|
||||||
for (func = type->functionList.begin(); func != type->functionList.end(); ++func) {
|
for (func = type->functionList.begin(); func != type->functionList.end(); ++func) {
|
||||||
if (func->isVirtual)
|
if (func->isVirtual) {
|
||||||
if (allocation)
|
if (allocation)
|
||||||
mallocOnClassError(tok, tok->str(), type->classDef, "virtual method");
|
mallocOnClassError(tok, tok->str(), type->classDef, "virtual method");
|
||||||
else
|
else
|
||||||
memsetError(tok, tok->str(), "virtual method", type->classDef->str());
|
memsetError(tok, tok->str(), "virtual method", type->classDef->str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warn if type is a class or struct that contains any std::* variables
|
// Warn if type is a class or struct that contains any std::* variables
|
||||||
|
|
Loading…
Reference in New Issue