From b013f1b3d0a03eef5c5521b2fbec66dd1927a583 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Mon, 10 May 2021 08:01:30 +0200 Subject: [PATCH] Fix test case for #10186 (#3253) --- test/testleakautovar.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/testleakautovar.cpp b/test/testleakautovar.cpp index 9f867eae7..00290b16f 100644 --- a/test/testleakautovar.cpp +++ b/test/testleakautovar.cpp @@ -429,13 +429,7 @@ private: void assign21() { // #10186 check("void f(int **x) {\n" " void *p = malloc(10);\n" - " *x = p;\n" - "}", true); - ASSERT_EQUALS("", errout.str()); - - check("void f(struct str *d) {\n" - " void *p = malloc(10);\n" - " d->a = p;\n" + " *x = (int*)p;\n" "}", true); ASSERT_EQUALS("", errout.str()); }