Add regression test for #6669 Return value of malloc is reported not stored, while it is.

This commit is contained in:
Alexander Mai 2015-10-26 18:24:49 +01:00
parent 636bf75799
commit 7d8b62e615
1 changed files with 6 additions and 0 deletions

View File

@ -6122,6 +6122,12 @@ private:
" return 0;\n"
"}");
ASSERT_EQUALS("", errout.str());
// #6669
check("void foo(size_t size) {\n"
" void * res{malloc(size)};\n"
"}", "test.cpp", false, false, true, &settings);
ASSERT_EQUALS("", errout.str());
}
void redundantPointerOp() {