From 69ee464dff70cd1bad099b0d51861ccc422a072f Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 2 Feb 2022 19:29:01 +0100 Subject: [PATCH] Fix test for #9827 (#3781) --- test/testnullpointer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index 7d0986e2c..9a8363394 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -3506,11 +3506,13 @@ private: check("std::string f() {\n" // #9827 " char* p = NULL;\n" - " const int rc = ::g(p);\n" + " int r = g(p);\n" + " if (!r)\n" + " return \"\";\n" " std::string s(p);\n" " return s;\n" "}\n", /*inconclusive*/ true); - TODO_ASSERT_EQUALS("", "[test.cpp:4]: (warning, inconclusive) Possible null pointer dereference: p\n", errout.str()); + ASSERT_EQUALS("", errout.str()); } void nullpointerStdStream() {