Skip to content

Commit 1309e18

Browse files
committed
Convert EXP40-C to the new dataflow library
1 parent 9ca601a commit 1309e18

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

c/cert/src/rules/EXP40-C/DoNotModifyConstantObjects.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import cpp
1919
import codingstandards.c.cert
20-
import semmle.code.cpp.dataflow.DataFlow
20+
import semmle.code.cpp.dataflow.new.DataFlow
2121
import CastFlow::PathGraph
2222
import codingstandards.cpp.SideEffect
2323

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotModifyConstantObjects.ql:40,30-38)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotModifyConstantObjects.ql:41,22-30)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotModifyConstantObjects.ql:47,20-28)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotModifyConstantObjects.ql:52,19-27)
51
edges
6-
| test.c:5:8:5:9 | & ... | test.c:6:4:6:5 | aa | provenance | |
7-
| test.c:26:15:26:15 | a | test.c:27:4:27:4 | a | provenance | |
2+
| test.c:5:3:5:9 | ... = ... | test.c:6:3:6:5 | * ... | provenance | |
3+
| test.c:5:8:5:9 | & ... | test.c:5:3:5:9 | ... = ... | provenance | |
4+
| test.c:26:15:26:15 | a | test.c:27:3:27:4 | * ... | provenance | |
5+
| test.c:34:13:34:14 | & ... | test.c:34:13:34:14 | & ... | provenance | |
6+
| test.c:34:13:34:14 | & ... | test.c:37:3:37:10 | ... = ... | provenance | |
87
| test.c:34:13:34:14 | & ... | test.c:39:7:39:8 | p1 | provenance | |
8+
| test.c:37:3:37:10 | ... = ... | test.c:40:7:40:9 | * ... | provenance | |
99
| test.c:39:7:39:8 | p1 | test.c:26:15:26:15 | a | provenance | |
1010
| test.c:40:7:40:9 | * ... | test.c:26:15:26:15 | a | provenance | |
11-
| test.c:59:7:59:8 | & ... | test.c:60:4:60:4 | p | provenance | |
12-
| test.c:79:11:79:16 | call to strchr | test.c:81:6:81:12 | ... ++ | provenance | |
11+
| test.c:59:3:59:8 | ... = ... | test.c:60:3:60:4 | * ... | provenance | |
12+
| test.c:59:7:59:8 | & ... | test.c:59:3:59:8 | ... = ... | provenance | |
13+
| test.c:79:3:79:31 | ... = ... | test.c:81:5:81:12 | * ... | provenance | |
14+
| test.c:79:11:79:16 | call to strchr | test.c:79:3:79:31 | ... = ... | provenance | |
1315
nodes
16+
| test.c:5:3:5:9 | ... = ... | semmle.label | ... = ... |
1417
| test.c:5:8:5:9 | & ... | semmle.label | & ... |
15-
| test.c:6:4:6:5 | aa | semmle.label | aa |
18+
| test.c:6:3:6:5 | * ... | semmle.label | * ... |
1619
| test.c:26:15:26:15 | a | semmle.label | a |
17-
| test.c:27:4:27:4 | a | semmle.label | a |
20+
| test.c:27:3:27:4 | * ... | semmle.label | * ... |
1821
| test.c:34:13:34:14 | & ... | semmle.label | & ... |
22+
| test.c:34:13:34:14 | & ... | semmle.label | & ... |
23+
| test.c:37:3:37:10 | ... = ... | semmle.label | ... = ... |
1924
| test.c:39:7:39:8 | p1 | semmle.label | p1 |
2025
| test.c:40:7:40:9 | * ... | semmle.label | * ... |
26+
| test.c:59:3:59:8 | ... = ... | semmle.label | ... = ... |
2127
| test.c:59:7:59:8 | & ... | semmle.label | & ... |
22-
| test.c:60:4:60:4 | p | semmle.label | p |
23-
| test.c:74:12:74:12 | s | semmle.label | s |
28+
| test.c:60:3:60:4 | * ... | semmle.label | * ... |
29+
| test.c:74:3:74:12 | * ... | semmle.label | * ... |
30+
| test.c:79:3:79:31 | ... = ... | semmle.label | ... = ... |
2431
| test.c:79:11:79:16 | call to strchr | semmle.label | call to strchr |
25-
| test.c:81:6:81:12 | ... ++ | semmle.label | ... ++ |
32+
| test.c:81:5:81:12 | * ... | semmle.label | * ... |
2633
subpaths
2734
#select
28-
| test.c:6:4:6:5 | aa | test.c:5:8:5:9 | & ... | test.c:6:4:6:5 | aa | Const variable assigned with non const-value. |
29-
| test.c:27:4:27:4 | a | test.c:34:13:34:14 | & ... | test.c:27:4:27:4 | a | Const variable assigned with non const-value. |
30-
| test.c:27:4:27:4 | a | test.c:40:7:40:9 | * ... | test.c:27:4:27:4 | a | Const variable assigned with non const-value. |
31-
| test.c:60:4:60:4 | p | test.c:59:7:59:8 | & ... | test.c:60:4:60:4 | p | Const variable assigned with non const-value. |
32-
| test.c:74:12:74:12 | s | test.c:74:12:74:12 | s | test.c:74:12:74:12 | s | Const variable assigned with non const-value. |
33-
| test.c:81:6:81:12 | ... ++ | test.c:79:11:79:16 | call to strchr | test.c:81:6:81:12 | ... ++ | Const variable assigned with non const-value. |
35+
| test.c:6:3:6:5 | * ... | test.c:5:8:5:9 | & ... | test.c:6:3:6:5 | * ... | Const variable assigned with non const-value. |
36+
| test.c:27:3:27:4 | * ... | test.c:34:13:34:14 | & ... | test.c:27:3:27:4 | * ... | Const variable assigned with non const-value. |
37+
| test.c:27:3:27:4 | * ... | test.c:40:7:40:9 | * ... | test.c:27:3:27:4 | * ... | Const variable assigned with non const-value. |
38+
| test.c:60:3:60:4 | * ... | test.c:59:7:59:8 | & ... | test.c:60:3:60:4 | * ... | Const variable assigned with non const-value. |
39+
| test.c:74:3:74:12 | * ... | test.c:74:3:74:12 | * ... | test.c:74:3:74:12 | * ... | Const variable assigned with non const-value. |
40+
| test.c:81:5:81:12 | * ... | test.c:79:11:79:16 | call to strchr | test.c:81:5:81:12 | * ... | Const variable assigned with non const-value. |

0 commit comments

Comments
 (0)