Skip to content

Commit 871b02e

Browse files
committed
removed testcase for danmar#5238. it's not good enough.
1 parent 8448660 commit 871b02e

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

test/testnullpointer.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class TestNullPointer : public TestFixture {
7171
TEST_CASE(nullpointer26); // #3589
7272
TEST_CASE(nullpointer27); // #6568
7373
TEST_CASE(nullpointer28); // #6491
74-
TEST_CASE(nullpointer29); // #5238
7574
TEST_CASE(nullpointer30); // #6392
7675
TEST_CASE(nullpointer_addressOf); // address of
7776
TEST_CASE(nullpointerSwitch); // #2626
@@ -1307,23 +1306,6 @@ class TestNullPointer : public TestFixture {
13071306
ASSERT_EQUALS("[test.cpp:4]: (error) Possible null pointer dereference: s\n", errout.str());
13081307
}
13091308

1310-
void nullpointer29() { // #5238
1311-
check("struct SomeStruct\n"
1312-
"{\n"
1313-
" bool item;\n"
1314-
"};\n"
1315-
"bool f1(bool bFlag)\n"
1316-
"{\n"
1317-
" SomeStruct *s = 0;\n"
1318-
" if (bFlag)\n"
1319-
" {\n"
1320-
" s = new SomeStruct;\n"
1321-
" }\n"
1322-
" return s != 0 || (s != 0 && !s->item);\n"
1323-
"}\n", true);
1324-
ASSERT_EQUALS("[test.cpp:12] -> [test.cpp:12]: (warning) Either the condition 's!=0' is redundant or there is possible null pointer dereference: s.\n", errout.str());
1325-
}
1326-
13271309
void nullpointer30() { // #6392
13281310
check("void f(std::vector<std::string> *values)\n"
13291311
"{\n"

0 commit comments

Comments
 (0)