@@ -187,16 +187,16 @@ class TestIncompleteStatement : public TestFixture {
187187 ASSERT_EQUALS (" " , errout_str ());
188188
189189 check (" void f() { (void*)0; }" );
190- ASSERT_EQUALS (" [test.cpp:1:12]: (warning) Redundant code: Found a statement that begins with numeric constant . [constStatement]\n " , errout_str ());
190+ ASSERT_EQUALS (" [test.cpp:1:12]: (warning) Redundant code: Found unused cast in expression '(void*)0' . [constStatement]\n " , errout_str ());
191191
192192 check (" void f() {\n " // #13148
193193 " static_cast<void>(1);\n "
194194 " static_cast<void>(nullptr);\n "
195195 " (void)NULL;\n "
196196 " }\n " );
197- ASSERT_EQUALS (" [test.cpp:2:22]: (warning) Redundant code: Found a statement that begins with numeric constant . [constStatement]\n "
198- " [test.cpp:3:22]: (warning) Redundant code: Found a statement that begins with NULL constant . [constStatement]\n "
199- " [test.cpp:4:5]: (warning) Redundant code: Found a statement that begins with NULL constant . [constStatement]\n " ,
197+ ASSERT_EQUALS (" [test.cpp:2:22]: (warning) Redundant code: Found unused cast in expression 'static_cast<void>(1)' . [constStatement]\n "
198+ " [test.cpp:3:22]: (warning) Redundant code: Found unused cast in expression 'static_cast<void>(nullptr)' . [constStatement]\n "
199+ " [test.cpp:4:5]: (warning) Redundant code: Found unused cast in expression '(void) NULL' . [constStatement]\n " ,
200200 errout_str ());
201201
202202 check (" #define X 0\n "
@@ -448,11 +448,11 @@ class TestIncompleteStatement : public TestFixture {
448448 " }\n " , dinit (CheckOptions, $.inconclusive = true ));
449449 ASSERT_EQUALS (" [test.cpp:2:5]: (warning) Redundant code: Found a statement that begins with numeric constant. [constStatement]\n "
450450 " [test.cpp:3:6]: (warning) Redundant code: Found a statement that begins with numeric constant. [constStatement]\n "
451- " [test.cpp:4:5]: (warning) Redundant code: Found a statement that begins with numeric constant . [constStatement]\n "
452- " [test.cpp:5:6]: (warning) Redundant code: Found a statement that begins with numeric constant . [constStatement]\n "
451+ " [test.cpp:4:5]: (warning) Redundant code: Found unused cast in expression '(char)1' . [constStatement]\n "
452+ " [test.cpp:5:6]: (warning) Redundant code: Found unused cast in expression '(char)1' . [constStatement]\n "
453453 " [test.cpp:6:5]: (warning, inconclusive) Found suspicious operator '!', result is not used. [constStatement]\n "
454454 " [test.cpp:7:6]: (warning, inconclusive) Found suspicious operator '!', result is not used. [constStatement]\n "
455- " [test.cpp:8:5]: (warning) Redundant code: Found unused cast of expression '!x'. [constStatement]\n "
455+ " [test.cpp:8:5]: (warning) Redundant code: Found unused cast in expression '(unsigned int) !x'. [constStatement]\n "
456456 " [test.cpp:9:5]: (warning, inconclusive) Found suspicious operator '~', result is not used. [constStatement]\n " ,
457457 errout_str ());
458458
@@ -463,7 +463,7 @@ class TestIncompleteStatement : public TestFixture {
463463 ASSERT_EQUALS (" " , errout_str ());
464464
465465 check (" void f(int x) { static_cast<unsigned>(x); }" );
466- ASSERT_EQUALS (" [test.cpp:1:38]: (warning) Redundant code: Found unused cast of expression 'x '. [constStatement]\n " , errout_str ());
466+ ASSERT_EQUALS (" [test.cpp:1:38]: (warning) Redundant code: Found unused cast in expression 'static_cast<unsigned int>(x) '. [constStatement]\n " , errout_str ());
467467
468468 check (" void f(int x, int* p) {\n "
469469 " static_cast<void>(x);\n "
@@ -481,9 +481,9 @@ class TestIncompleteStatement : public TestFixture {
481481 " static_cast<float>((char)i);\n "
482482 " (char)static_cast<float>(i);\n "
483483 " }\n " );
484- ASSERT_EQUALS (" [test.cpp:2:5]: (warning) Redundant code: Found unused cast of expression 'i'. [constStatement]\n "
485- " [test.cpp:3:23]: (warning) Redundant code: Found unused cast of expression 'i '. [constStatement]\n "
486- " [test.cpp:4:5]: (warning) Redundant code: Found unused cast of expression 'i '. [constStatement]\n " ,
484+ ASSERT_EQUALS (" [test.cpp:2:5]: (warning) Redundant code: Found unused cast in expression '(float)(char) i'. [constStatement]\n "
485+ " [test.cpp:3:23]: (warning) Redundant code: Found unused cast in expression 'static_cast<float>((char)i) '. [constStatement]\n "
486+ " [test.cpp:4:5]: (warning) Redundant code: Found unused cast in expression '(char)static_cast<float>(i) '. [constStatement]\n " ,
487487 errout_str ());
488488
489489 check (" namespace M {\n "
@@ -492,7 +492,7 @@ class TestIncompleteStatement : public TestFixture {
492492 " void f(int i) {\n "
493493 " (M::N::T)i;\n "
494494 " }\n " );
495- ASSERT_EQUALS (" [test.cpp:5:5]: (warning) Redundant code: Found unused cast of expression 'i'. [constStatement]\n " , errout_str ());
495+ ASSERT_EQUALS (" [test.cpp:5:5]: (warning) Redundant code: Found unused cast in expression '(char) i'. [constStatement]\n " , errout_str ());
496496
497497 check (" void f(int (g)(int a, int b)) {\n " // #10873
498498 " int p = 0, q = 1;\n "
@@ -544,7 +544,7 @@ class TestIncompleteStatement : public TestFixture {
544544 " for (L\" y\" ; ;) {}\n "
545545 " }\n " );
546546 ASSERT_EQUALS (" [test.cpp:2:10]: (warning) Unused variable value 'i' [constStatement]\n "
547- " [test.cpp:3:10]: (warning) Redundant code: Found unused cast of expression 'i'. [constStatement]\n "
547+ " [test.cpp:3:10]: (warning) Redundant code: Found unused cast in expression '(long) i'. [constStatement]\n "
548548 " [test.cpp:4:10]: (warning) Redundant code: Found a statement that begins with numeric constant. [constStatement]\n "
549549 " [test.cpp:5:10]: (warning) Redundant code: Found a statement that begins with bool constant. [constStatement]\n "
550550 " [test.cpp:6:10]: (warning) Redundant code: Found a statement that begins with character constant. [constStatement]\n "
@@ -712,8 +712,8 @@ class TestIncompleteStatement : public TestFixture {
712712 " NULL;\n "
713713 " nullptr;\n "
714714 " }\n " );
715- ASSERT_EQUALS (" [test.cpp:2:5]: (warning) Redundant code: Found a statement that begins with NULL constant. [constStatement]\n "
716- " [test.cpp:3:5]: (warning) Redundant code: Found a statement that begins with NULL constant. [constStatement]\n " ,
715+ ASSERT_EQUALS (" [test.cpp:2:5]: (warning) Redundant code: Found a statement that begins with null constant. [constStatement]\n "
716+ " [test.cpp:3:5]: (warning) Redundant code: Found a statement that begins with null constant. [constStatement]\n " ,
717717 errout_str ());
718718
719719 check (" struct S { int i; };\n " // #6504
0 commit comments