Skip to content

Commit 0c20066

Browse files
committed
Add a non-compliant case.
1 parent 0b02dc4 commit 0c20066

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| test.cpp:23:14:23:26 | uncalled_func | Function uncalled_func is never called. |

cpp/autosar/test/rules/M0-1-10.1/test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ std::int32_t func1() { // COMPLIANT: Called from main
2020
return mains::var + func2(); // func2 called here.
2121
}
2222

23+
std::int32_t uncalled_func() // NON COMPLIANT: Not called.
24+
{
25+
return mains::var + func1(); // func1 called here.
26+
}
27+
2328
// @brief main
2429
// @return exit code
2530
std::int32_t main(void) {

0 commit comments

Comments
 (0)