astyle formatting

This commit is contained in:
Daniel Marjamäki 2013-04-30 06:44:50 +02:00
parent 47ef8cf455
commit cf75e2bb28
2 changed files with 6 additions and 6 deletions

View File

@ -2590,8 +2590,8 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var
// Struct member is allocated => check if it is also properly deallocated..
else if (Token::Match(tok2->previous(), "[;{}] %varid% . %var% = malloc|strdup|kmalloc (", variable->varId())
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = new ", variable->varId())
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = fopen (", variable->varId())) {
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = new ", variable->varId())
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = fopen (", variable->varId())) {
const unsigned int structid(variable->varId());
const unsigned int structmemberid(tok2->tokAt(2)->varId());
@ -2611,9 +2611,9 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var
// Deallocating the struct member..
else if (Token::Match(tok3, "free|kfree ( %var% . %varid% )", structmemberid)
|| Token::Match(tok3, "delete %var% . %varid%", structmemberid)
|| Token::Match(tok3, "delete [ ] %var% . %varid%", structmemberid)
|| Token::Match(tok3, "fclose ( %var% . %varid%", structmemberid)) {
|| Token::Match(tok3, "delete %var% . %varid%", structmemberid)
|| Token::Match(tok3, "delete [ ] %var% . %varid%", structmemberid)
|| Token::Match(tok3, "fclose ( %var% . %varid%", structmemberid)) {
// If the deallocation happens at the base level, don't check this member anymore
if (indentlevel3 == 0)
break;

View File

@ -5325,7 +5325,7 @@ private:
// Ticket #933 Leaks with struct members not detected
void localvars() {
// Test error case
// Test error case
const char code_err[] = "struct A {\n"
" FILE* f;\n"
" char* c;\n"