Skip to content

Commit f22351f

Browse files
committed
RULE-21-10: Simplify alert msg, remove std headers
1 parent efd7b79 commit f22351f

File tree

5 files changed

+8
-379
lines changed

5 files changed

+8
-379
lines changed

c/misra/src/rules/RULE-21-10/StandardLibraryTimeAndDateFunctionsUsed.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ where
2525
f.getFile().getBaseName() = "wchar.h"
2626
)
2727
)
28-
select fc, "Call to banned function $@.", f, f.getName()
28+
select fc, "Call to banned function " + f.getName() + "."
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| test.c:6:18:6:21 | call to time | Call to banned function $@. | time.h:53:8:53:11 | time | time |
2-
| test.c:9:19:9:23 | call to ctime | Call to banned function $@. | time.h:60:7:60:11 | ctime | ctime |
3-
| test.c:17:3:17:6 | call to time | Call to banned function $@. | time.h:53:8:53:11 | time | time |
4-
| test.c:18:8:18:16 | call to localtime | Call to banned function $@. | time.h:58:12:58:20 | localtime | localtime |
5-
| test.c:19:3:19:10 | call to wcsftime | Call to banned function $@. | wchar.h:139:8:139:15 | wcsftime | wcsftime |
1+
| test.c:6:18:6:21 | call to time | Call to banned function time. |
2+
| test.c:9:19:9:23 | call to ctime | Call to banned function ctime. |
3+
| test.c:17:3:17:6 | call to time | Call to banned function time. |
4+
| test.c:18:8:18:16 | call to localtime | Call to banned function localtime. |
5+
| test.c:19:3:19:10 | call to wcsftime | Call to banned function wcsftime. |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "time.h"
2-
#include "wchar.h"
1+
#include <time.h>
2+
#include <wchar.h>
33
void f1() {
44
time_t current_time;
55
char *c_time_string;

c/misra/test/rules/RULE-21-10/time.h

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

c/misra/test/rules/RULE-21-10/wchar.h

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

0 commit comments

Comments
 (0)