You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testother.cpp
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9562,6 +9562,13 @@ class TestOther : public TestFixture {
9562
9562
" memset(a, false, 5);\n"
9563
9563
"}");
9564
9564
ASSERT_EQUALS("[test.cpp:3]: (portability, inconclusive) Array 'a' might be filled incompletely. Did you forget to multiply the size given to 'memset()' with 'sizeof(*a)'?\n", errout_str());
9565
+
9566
+
check("void f() {\n"
9567
+
" const int n = 5;"
9568
+
" int a[n];\n"
9569
+
" memset(a, 0, n);\n"
9570
+
"}");
9571
+
ASSERT_EQUALS("[test.cpp:3]: (warning, inconclusive) Array 'a' is filled incompletely. Did you forget to multiply the size given to 'memset()' with 'sizeof(*a)'?\n", errout_str());
0 commit comments