We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dfc5a6 commit d4a98dfCopy full SHA for d4a98df
test/testuninitvar.cpp
@@ -3090,6 +3090,16 @@ class TestUninitVar : public TestFixture {
3090
3091
// Handling of function calls
3092
void uninitvar2_func() {
3093
+ // #4716
3094
+ checkUninitVar("void bar(const int a, const int * const b);\n"
3095
+ "int foo(void) {\n"
3096
+ " int a;\n"
3097
+ " int *b = 0;\n"
3098
+ " bar(a,b);\n" // <<
3099
+ " return 0;\n"
3100
+ "}");
3101
+ ASSERT_EQUALS("[test.cpp:5]: (error) Uninitialized variable: a\n", errout.str());
3102
+
3103
// non-pointer variable
3104
checkUninitVar("void a(char);\n" // value => error
3105
"void b() {\n"
0 commit comments