diff --git a/test/testunusedvar.cpp b/test/testunusedvar.cpp index 0e9eb5a92..cc8662646 100644 --- a/test/testunusedvar.cpp +++ b/test/testunusedvar.cpp @@ -2801,12 +2801,6 @@ private: "}", "test.c"); ASSERT_EQUALS("[test.c:3]: (style) Variable 'c' is assigned a value that is never used.\n", errout.str()); - functionVariableUsage("void f(int c) {\n" - " int x;\n" - " if (c >> x) {}\n" - "}"); - ASSERT_EQUALS("[test.cpp:2]: (style) Variable 'x' is not assigned a value.\n", errout.str()); - functionVariableUsage("void f() {\n" " int x, y;\n" " std::cin >> x >> y;\n" @@ -2819,12 +2813,6 @@ private: " c & x;\n" "}"); ASSERT_EQUALS("", errout.str()); - - functionVariableUsage("void f(int c) {\n" - " int x;\n" - " c & x;\n" - "}"); - ASSERT_EQUALS("[test.cpp:2]: (style) Variable 'x' is not assigned a value.\n", errout.str()); } void localvar33() { // ticket #2345 @@ -3483,15 +3471,6 @@ private: // extracttests.start: int a[10]; functionVariableUsage("void foo()\n" - "{\n" - " int *b = a;\n" - " int *c;\n" - " *c = b[0];\n" - "}"); - ASSERT_EQUALS("[test.cpp:4]: (style) Variable 'c' is not assigned a value.\n", errout.str()); - - functionVariableUsage("int a[10];\n" - "void foo()\n" "{\n" " int *b = a;\n" " int c = b[0];\n"