Skip to content

Commit 25d51c6

Browse files
committed
RULE-21-21: Simplify alert message
1 parent 268d1f4 commit 25d51c6

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

c/misra/src/rules/RULE-21-21/SystemOfStdlibhUsed.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ where
1919
not isExcluded(call, BannedPackage::systemOfStdlibhUsedQuery()) and
2020
call.getTarget() = target and
2121
target.hasGlobalOrStdName("system")
22-
select call, "Call to banned function $@.", target, target.getName()
22+
select call, "Call to banned function " + target.getName() + "."
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| test.c:10:3:10:8 | call to system | Call to banned function $@. | test.c:4:5:4:10 | system | system |
2-
| test.c:18:3:18:8 | call to system | Call to banned function $@. | test.c:4:5:4:10 | system | system |
3-
| test.c:19:3:19:8 | call to system | Call to banned function $@. | test.c:4:5:4:10 | system | system |
4-
| test.c:20:3:20:8 | call to system | Call to banned function $@. | test.c:4:5:4:10 | system | system |
5-
| test.c:21:3:21:8 | call to system | Call to banned function $@. | test.c:4:5:4:10 | system | system |
1+
| test.c:6:3:6:8 | call to system | Call to banned function system. |
2+
| test.c:14:3:14:8 | call to system | Call to banned function system. |
3+
| test.c:15:3:15:8 | call to system | Call to banned function system. |
4+
| test.c:16:3:16:8 | call to system | Call to banned function system. |
5+
| test.c:17:3:17:8 | call to system | Call to banned function system. |

c/misra/test/rules/RULE-21-21/SystemOfStdlibhUsed.testref

Lines changed: 0 additions & 1 deletion
This file was deleted.

c/misra/test/rules/RULE-21-21/test.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
typedef struct _FILE FILE;
2-
#define NULL (void *)0
3-
4-
int system(const char *);
5-
void abort(void);
6-
FILE *popen(const char *, const char *);
1+
#include <stdio.h>
2+
#include <stdlib.h>
73

84
void f1(const char *p1) {
95
FILE *l1;

0 commit comments

Comments
 (0)