Skip to content

Commit 69ee464

Browse files
Fix test for #9827 (#3781)
1 parent 8cf5c8f commit 69ee464

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/testnullpointer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3506,11 +3506,13 @@ class TestNullPointer : public TestFixture {
35063506

35073507
check("std::string f() {\n" // #9827
35083508
" char* p = NULL;\n"
3509-
" const int rc = ::g(p);\n"
3509+
" int r = g(p);\n"
3510+
" if (!r)\n"
3511+
" return \"\";\n"
35103512
" std::string s(p);\n"
35113513
" return s;\n"
35123514
"}\n", /*inconclusive*/ true);
3513-
TODO_ASSERT_EQUALS("", "[test.cpp:4]: (warning, inconclusive) Possible null pointer dereference: p\n", errout.str());
3515+
ASSERT_EQUALS("", errout.str());
35143516
}
35153517

35163518
void nullpointerStdStream() {

0 commit comments

Comments
 (0)