From b35acc1e6b5fe000064532f5c3f164ffa3fb9ed2 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Thu, 25 Feb 2010 22:55:09 +0200 Subject: [PATCH] Add TODO test case for #1444 (inline suppression suppress all errors of the same type in a function) http://sourceforge.net/apps/trac/cppcheck/ticket/1444 --- test/testother.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/testother.cpp b/test/testother.cpp index 99930949f..0c38d2794 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -1030,6 +1030,17 @@ private: " f();\n" "}\n"); ASSERT_EQUALS("[test.cpp:5]: (error) Possible null pointer dereference: f\n", errout.str()); + + checkNullPointer("static void foo()\n" + "{\n" + " int *p = 0;\n" + " int *p2 = 0;\n" + " int r = *p;\n" + " int r2 = *p2;\n" + "}\n"); + TODO_ASSERT_EQUALS("[test.cpp:5]: (error) Null pointer dereference\n" + "[test.cpp:6]: (error) Null pointer dereference\n", errout.str()); + } void nullpointer7()