fix unit test for varFuncNullUB

This commit is contained in:
rofl0r 2013-01-15 20:45:53 +01:00
parent de72ae9f45
commit 623e30d677
1 changed files with 1 additions and 1 deletions

View File

@ -6805,7 +6805,7 @@ private:
void varFuncNullUB() { // #4482 void varFuncNullUB() { // #4482
check("void a(...);\n" check("void a(...);\n"
"void b() { a(NULL); }"); "void b() { a(NULL); }");
ASSERT_EQUALS("[test.cpp:2]: (portability) Passing NULL to a function with variable number of arguments leads to undefined behaviour on some platforms.\n", errout.str()); ASSERT_EQUALS("[test.cpp:2]: (portability) Passing NULL after the last typed argument to a variadic function leads to undefined behaviour.\n", errout.str());
check("void a(char *p, ...);\n" check("void a(char *p, ...);\n"
"void b() { a(NULL, 2); }"); "void b() { a(NULL, 2); }");