diff --git a/test/testleakautovar.cpp b/test/testleakautovar.cpp index 227ba0840e2..7838679d6dd 100644 --- a/test/testleakautovar.cpp +++ b/test/testleakautovar.cpp @@ -659,7 +659,7 @@ class TestLeakAutoVar : public TestFixture { check("void f(char* old, char* value, size_t len) {\n" " char *str = strdup(value);\n" " memcpy(old, str, len);\n" - "}\n", dinit(CheckOptions, $.s = &s)); + "}\n", dinit(CheckOptions, $.cpp = true, $.s = &s)); ASSERT_EQUALS("[test.cpp:4]: (error) Memory leak: str\n", errout_str()); } @@ -2805,7 +2805,7 @@ class TestLeakAutoVar : public TestFixture { " free(ptr);\n" " }\n" " return 'a';\n" - "}\n", dinit(CheckOptions, $.cpp = true)); + "}\n"); ASSERT_EQUALS("[test.c:7]: (error) Memory leak: ptr\n", errout_str()); }