File tree Expand file tree Collapse file tree 7 files changed +23
-22
lines changed Expand file tree Collapse file tree 7 files changed +23
-22
lines changed Original file line number Diff line number Diff line change 1- // NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND CHANGES
2- // SHOULD BE REFLECTED THERE AS WELL.
1+ // NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+ // CHANGES SHOULD BE REFLECTED THERE AS WELL.
33// Define true/false for compatibility with C++ test cases
44#define false 0
55#define true 1
Original file line number Diff line number Diff line change 1- // NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND CHANGES
2- // SHOULD BE REFLECTED THERE AS WELL.
1+ // NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+ // CHANGES SHOULD BE REFLECTED THERE AS WELL.
33
44void test_switch (int p1 ) {
55 int l1 = 0 ;
Original file line number Diff line number Diff line change 11| file://:0:0:0:0 | __va_list_tag | Type declaration __va_list_tag is not used. |
22| test.c:4:8:4:8 | A | Type declaration A is not used. |
33| test.c:7:18:7:18 | D | Type declaration D is not used. |
4- | test.c:30 :11:30 :11 | R | Type declaration R is not used. |
5- | test.c:43 :12:43 :12 | struct <unnamed> | Type declaration struct <unnamed> is not used. |
4+ | test.c:28 :11:28 :11 | R | Type declaration R is not used. |
5+ | test.c:41 :12:41 :12 | struct <unnamed> | Type declaration struct <unnamed> is not used. |
Original file line number Diff line number Diff line change 1- // NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND CHANGES
2- // SHOULD BE REFLECTED THERE AS WELL.
1+ // NOTICE: THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C++ TEST CASE AND
2+ // CHANGES SHOULD BE REFLECTED THERE AS WELL.
33
44struct A {}; // NON_COMPLIANT - unused
55
6- struct C {}; // COMPLIANT - used in the type def
6+ struct C {}; // COMPLIANT - used in the type def
77typedef struct C D ; // NON_COMPLIANT - typedef itself not used
88
99struct F {}; // COMPLIANT - used as a global function return type
@@ -17,17 +17,15 @@ struct G {}; // COMPLIANT - used as a global function parameter type
1717
1818void test_global_function (struct G g ) {}
1919
20- enum M { C1 , C2 , C3 }; // COMPLIANT - used in an enum type access below
20+ enum M { C1 , C2 , C3 }; // COMPLIANT - used in an enum type access below
2121
22- void test_enum_access () {
23- int i = C1 ;
24- }
22+ void test_enum_access () { int i = C1 ; }
2523
2624struct O {}; // COMPLIANT - used in typedef below
2725
2826typedef struct O P ; // COMPLIANT - used in typedef below
29- typedef P Q ; // COMPLIANT - used in function below
30- typedef Q R ; // NON_COMPLIANT - never used
27+ typedef P Q ; // COMPLIANT - used in function below
28+ typedef Q R ; // NON_COMPLIANT - never used
3129
3230Q test_type_def () {}
3331
Original file line number Diff line number Diff line change 1- | test.cpp:14 :3:14 :12 | declaration | This statement in function $@ is unreachable. | test.cpp:12 :5:12 :21 | test_after_return | test_after_return |
2- | test.cpp:18 :10:19 :12 | { ... } | This statement in function $@ is unreachable. | test.cpp:17 :5:17 :27 | test_constant_condition | test_constant_condition |
3- | test.cpp:29 :10:30 :12 | { ... } | This statement in function $@ is unreachable. | test.cpp:28 :24:28 :24 | f | f |
4- | test.cpp:50 :12:51 :14 | { ... } | This statement in function $@ is unreachable. | test.cpp:49 :7:49 :8 | h1 | h1 |
5- | test.cpp:55 :12:56 :14 | { ... } | This statement in function $@ is unreachable. | test.cpp:54 :7:54 :8 | h2 | h2 |
1+ | test.cpp:17 :3:17 :12 | declaration | This statement in function $@ is unreachable. | test.cpp:15 :5:15 :21 | test_after_return | test_after_return |
2+ | test.cpp:21 :10:22 :12 | { ... } | This statement in function $@ is unreachable. | test.cpp:20 :5:20 :27 | test_constant_condition | test_constant_condition |
3+ | test.cpp:32 :10:33 :12 | { ... } | This statement in function $@ is unreachable. | test.cpp:31 :24:31 :24 | f | f |
4+ | test.cpp:53 :12:54 :14 | { ... } | This statement in function $@ is unreachable. | test.cpp:52 :7:52 :8 | h1 | h1 |
5+ | test.cpp:58 :12:59 :14 | { ... } | This statement in function $@ is unreachable. | test.cpp:57 :7:57 :8 | h2 | h2 |
Original file line number Diff line number Diff line change 1+ // NOTICE: SOME OF THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C TEST CASE AND
2+ // CHANGES SHOULD BE REFLECTED THERE AS WELL.
3+
14void test_switch (int p1) {
25 int l1 = 0 ;
36 switch (p1) {
Original file line number Diff line number Diff line change 1- // NOTICE: SOME OF THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C TEST CASE AND CHANGES
2- // SHOULD BE REFLECTED THERE AS WELL.
1+ // NOTICE: SOME OF THE TEST CASES BELOW ARE ALSO INCLUDED IN THE C TEST CASE AND
2+ // CHANGES SHOULD BE REFLECTED THERE AS WELL.
33
44class A {}; // NON_COMPLIANT - unused
55
You can’t perform that action at this time.
0 commit comments