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
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -5328,22 +5328,22 @@ class TestOther : public TestFixture {
5328
5328
"return c == \"42\"[0];}", "test.c", false, true, false, false);
5329
5329
ASSERT_EQUALS("", errout.str());
5330
5330
5331
-
// 5639String literal compared with char buffer in a struct
5332
-
check("struct Example {\n"
5333
-
" char buffer[200];\n"
5334
-
"};\n"
5335
-
"void foo() {\n"
5336
-
" struct Example example;\n"
5337
-
" if (example.buffer == \"test\") ;\n"
5338
-
"}\n", "test.cpp", false, true, false, false);
5331
+
// 5639String literal compared with char buffer in a struct
5332
+
check("struct Example {\n"
5333
+
" char buffer[200];\n"
5334
+
"};\n"
5335
+
"void foo() {\n"
5336
+
" struct Example example;\n"
5337
+
" if (example.buffer == \"test\") ;\n"
5338
+
"}\n", "test.cpp", false, true, false, false);
5339
5339
ASSERT_EQUALS("[test.cpp:6]: (warning) String literal compared with variable 'example.buffer'. Did you intend to use strcmp() instead?\n", errout.str());
5340
-
check("struct Example {\n"
5341
-
" char buffer[200];\n"
5342
-
"};\n"
5343
-
"void foo() {\n"
5344
-
" struct Example example;\n"
5345
-
" if (example.buffer == \"test\") ;\n"
5346
-
"}\n", "test.c", false, true, false, false);
5340
+
check("struct Example {\n"
5341
+
" char buffer[200];\n"
5342
+
"};\n"
5343
+
"void foo() {\n"
5344
+
" struct Example example;\n"
5345
+
" if (example.buffer == \"test\") ;\n"
5346
+
"}\n", "test.c", false, true, false, false);
5347
5347
ASSERT_EQUALS("[test.c:6]: (warning) String literal compared with variable 'example.buffer'. Did you intend to use strcmp() instead?\n", errout.str());
0 commit comments