File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -10842,31 +10842,31 @@ class TestOther : public TestFixture {
10842
10842
"unsigned char c;\n"
10843
10843
"do {\n"
10844
10844
" c = getc (pFile);\n"
10845
- "} while (c != EOF)"
10845
+ "} while (c != EOF); "
10846
10846
"}");
10847
10847
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing getc() return value in char variable and then comparing with EOF.\n", errout_str());
10848
10848
10849
10849
check("void f (FILE * pFile){\n"
10850
10850
"unsigned char c;\n"
10851
10851
"do {\n"
10852
10852
" c = getc (pFile);\n"
10853
- "} while (EOF != c)"
10853
+ "} while (EOF != c); "
10854
10854
"}");
10855
10855
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing getc() return value in char variable and then comparing with EOF.\n", errout_str());
10856
10856
10857
10857
check("void f (FILE * pFile){\n"
10858
10858
"int i;\n"
10859
10859
"do {\n"
10860
10860
" i = getc (pFile);\n"
10861
- "} while (i != EOF)"
10861
+ "} while (i != EOF); "
10862
10862
"}");
10863
10863
ASSERT_EQUALS("", errout_str());
10864
10864
10865
10865
check("void f (FILE * pFile){\n"
10866
10866
"int i;\n"
10867
10867
"do {\n"
10868
10868
" i = getc (pFile);\n"
10869
- "} while (EOF != i)"
10869
+ "} while (EOF != i); "
10870
10870
"}");
10871
10871
ASSERT_EQUALS("", errout_str());
10872
10872
@@ -10876,31 +10876,31 @@ class TestOther : public TestFixture {
10876
10876
"unsigned char c;\n"
10877
10877
"do {\n"
10878
10878
" c = fgetc (pFile);\n"
10879
- "} while (c != EOF)"
10879
+ "} while (c != EOF); "
10880
10880
"}");
10881
10881
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing fgetc() return value in char variable and then comparing with EOF.\n", errout_str());
10882
10882
10883
10883
check("void f (FILE * pFile){\n"
10884
10884
"char c;\n"
10885
10885
"do {\n"
10886
10886
" c = fgetc (pFile);\n"
10887
- "} while (EOF != c)"
10887
+ "} while (EOF != c); "
10888
10888
"}");
10889
10889
ASSERT_EQUALS("[test.cpp:5]: (warning) Storing fgetc() return value in char variable and then comparing with EOF.\n", errout_str());
10890
10890
10891
10891
check("void f (FILE * pFile){\n"
10892
10892
"signed char c;\n"
10893
10893
"do {\n"
10894
10894
" c = fgetc (pFile);\n"
10895
- "} while (EOF != c)"
10895
+ "} while (EOF != c); "
10896
10896
"}");
10897
10897
ASSERT_EQUALS("", errout_str());
10898
10898
10899
10899
check("void f (FILE * pFile){\n"
10900
10900
"int i;\n"
10901
10901
"do {\n"
10902
10902
" i = fgetc (pFile);\n"
10903
- "} while (i != EOF)"
10903
+ "} while (i != EOF); "
10904
10904
"}");
10905
10905
ASSERT_EQUALS("", errout_str());
10906
10906
You can’t perform that action at this time.
0 commit comments