Skip to content

Commit cd0d4ac

Browse files
committed
RULE-21-5: Simplify alert message, remove signal.h
1 parent 892227e commit cd0d4ac

File tree

4 files changed

+4
-300
lines changed

4 files changed

+4
-300
lines changed

c/misra/src/rules/RULE-21-5/StandardHeaderFileUsedSignalh.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ where
1818
not isExcluded(fc, BannedPackage::standardHeaderFileUsedSignalhQuery()) and
1919
fc.getTarget() = f and
2020
f.getFile().getBaseName() = "signal.h"
21-
select fc, "Call to banned function $@.", f, f.getName()
21+
select fc, "Call to banned function " + f.getName() + "."
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| test.c:4:7:4:12 | call to signal | Call to banned function $@. | signal.h:282:8:282:13 | signal | signal |
2-
| test.c:6:7:6:11 | call to raise | Call to banned function $@. | signal.h:283:5:283:9 | raise | raise |
1+
| test.c:4:7:4:12 | call to signal | Call to banned function signal. |
2+
| test.c:6:7:6:11 | call to raise | Call to banned function raise. |

c/misra/test/rules/RULE-21-5/signal.h

Lines changed: 0 additions & 296 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "signal.h"
1+
#include <signal.h>
22
static void catch_function(int p1) {}
33
void f1(void) {
44
if (signal(SIGINT, catch_function) == SIG_ERR) { // NON_COMPLIANT

0 commit comments

Comments
 (0)