Skip to content

Commit 8df3ff3

Browse files
Update testuninitvar.cpp
1 parent 81b5c63 commit 8df3ff3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/testuninitvar.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,6 +2173,14 @@ class TestUninitVar : public TestFixture {
21732173
" return p;\n"
21742174
"}\n");
21752175
ASSERT_EQUALS("", errout_str());
2176+
2177+
checkUninitVar("struct S { char c[10]; };\n" // #11290
2178+
"S* f() {\n"
2179+
" S* s = (S*)malloc(sizeof(S));\n"
2180+
" sprintf(s->c, \"abc\");\n"
2181+
" return s;\n"
2182+
"}\n");
2183+
ASSERT_EQUALS("", errout_str());
21762184
}
21772185

21782186
// class / struct..

0 commit comments

Comments
 (0)