Robert Reif <reif@earthlink.net>
refactoring chained assignments
This commit is contained in:
parent
af4c4cef34
commit
95f3533252
|
@ -895,13 +895,9 @@ private:
|
||||||
functionVariableUsage("void foo()\n"
|
functionVariableUsage("void foo()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int a, b, c;\n"
|
" int a, b, c;\n"
|
||||||
" a = b = c = 0;\n"
|
" a = b = c = f();\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS(
|
ASSERT_EQUALS("[test.cpp:3]: (style) Variable 'a' is assigned a value that is never used\n", errout.str());
|
||||||
"[test.cpp:3]: (style) Variable 'a' is assigned a value that is never used\n"
|
|
||||||
"[test.cpp:3]: (style) Variable 'b' is assigned a value that is never used\n"
|
|
||||||
"[test.cpp:3]: (style) Variable 'c' is assigned a value that is never used\n",
|
|
||||||
errout.str());
|
|
||||||
|
|
||||||
functionVariableUsage("int * foo()\n"
|
functionVariableUsage("int * foo()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
|
Loading…
Reference in New Issue