Skip to content

Commit 1dffd73

Browse files
committed
Rule 17.2: Simplify alert message.
1 parent 298db28 commit 1dffd73

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

c/misra/src/rules/RULE-17-2/RecursiveFunctionCondition.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ where
2020
fc.getEnclosingFunction() = f and
2121
fc.getTarget().calls*(f) and
2222
if fc.getTarget() = f
23-
then msg = "This call directly invokes its containing function $@."
24-
else msg = "The function " + f + " is indirectly recursive via this call to $@."
23+
then msg = f + " calls itself directly."
24+
else msg = f + " is indirectly recursive via this call to $@."
2525
select fc, msg, fc.getTarget(), fc.getTarget().getName()
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| test.c:8:3:8:4 | call to f3 | This call directly invokes its containing function $@. | test.c:7:6:7:7 | f3 | f3 |
2-
| test.c:15:3:15:4 | call to f2 | The function f5 is indirectly recursive via this call to $@. | test.c:17:6:17:7 | f2 | f2 |
3-
| test.c:18:3:18:4 | call to f5 | The function f2 is indirectly recursive via this call to $@. | test.c:14:6:14:7 | f5 | f5 |
1+
| test.c:8:3:8:4 | call to f3 | f3 calls itself directly. | test.c:7:6:7:7 | f3 | f3 |
2+
| test.c:15:3:15:4 | call to f2 | f5 is indirectly recursive via this call to $@. | test.c:17:6:17:7 | f2 | f2 |
3+
| test.c:18:3:18:4 | call to f5 | f2 is indirectly recursive via this call to $@. | test.c:14:6:14:7 | f5 | f5 |

0 commit comments

Comments
 (0)