From fd31f0846ed20853022b357022a91366087e577b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 13 May 2021 21:53:06 +0200 Subject: [PATCH] unused var; remove test case that has undefined behavior --- test/testunusedvar.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/testunusedvar.cpp b/test/testunusedvar.cpp index 7d2bdc740..0e9eb5a92 100644 --- a/test/testunusedvar.cpp +++ b/test/testunusedvar.cpp @@ -2607,15 +2607,7 @@ private: " char *ptr = buf;\n" " *(ptr++) = 0;\n" "}"); - // TODO ASSERT_EQUALS("[test.cpp:5]: (style) Variable 'buf' is assigned a value that is never used.\n", errout.str()); - - functionVariableUsage("void foo()\n" - "{\n" - " char buf[5];\n" - " char *ptr = buf - 1;\n" - " *(++ptr) = 0;\n" - "}"); - ASSERT_EQUALS("[test.cpp:3]: (style) Variable 'buf' is not assigned a value.\n", errout.str()); + TODO_ASSERT_EQUALS("[test.cpp:5]: (style) Variable 'buf' is assigned a value that is never used.\n", "", errout.str()); // #3910 functionVariableUsage("void foo() {\n"