Skip to content

Commit

Permalink
Update testuninitvar.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 15, 2024
1 parent 5e3b23f commit b69c5b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/testuninitvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6549,8 +6549,10 @@ class TestUninitVar : public TestFixture {
" std::array<int, 1> b;\n"
" auto it = b.begin();\n"
" *it = 0;\n"
" std::array<int, 1> c;\n"
" return c.front();\n"
"}\n");
ASSERT_EQUALS("", errout_str());
ASSERT_EQUALS("[test.cpp:8]: (error) Uninitialized variable: c\n", errout_str());
}

void valueFlowUninitBreak() { // Do not show duplicate warnings about the same uninitialized value
Expand Down

0 comments on commit b69c5b9

Please sign in to comment.