CheckClass: Fixed GCC warning

This commit is contained in:
Daniel Marjamäki 2013-03-02 07:30:55 +01:00
parent 06c6e78be4
commit 9d195144ea
1 changed files with 2 additions and 1 deletions

View File

@ -873,11 +873,12 @@ void CheckClass::checkMemsetType(const Scope *start, const Token *tok, const Sco
std::list<Function>::const_iterator func;
for (func = type->functionList.begin(); func != type->functionList.end(); ++func) {
if (func->isVirtual)
if (func->isVirtual) {
if (allocation)
mallocOnClassError(tok, tok->str(), type->classDef, "virtual method");
else
memsetError(tok, tok->str(), "virtual method", type->classDef->str());
}
}
// Warn if type is a class or struct that contains any std::* variables