testunusedvar: fix mismatching allocation/deallocation in test

This commit is contained in:
Daniel Marjamäki 2021-05-14 14:01:39 +02:00
parent 5b3227db8d
commit 56410c3d00
1 changed files with 1 additions and 1 deletions

View File

@ -5036,7 +5036,7 @@ private:
"void foo()\n" "void foo()\n"
"{\n" "{\n"
" struct Fred* ptr = new Fred();\n" " struct Fred* ptr = new Fred();\n"
" free(ptr);\n" " delete ptr;\n"
"}"); "}");
ASSERT_EQUALS("[test.cpp:4]: (style) Variable 'ptr' is allocated memory that is never used.\n", errout.str()); ASSERT_EQUALS("[test.cpp:4]: (style) Variable 'ptr' is allocated memory that is never used.\n", errout.str());