Skip to content

Commit 2089bcd

Browse files
committed
Comvert ARR37-C to use the new dataflow library
1 parent 740bcd0 commit 2089bcd

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

c/cert/src/rules/ARR37-C/DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql

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

1919
import cpp
2020
import codingstandards.c.cert
21-
import semmle.code.cpp.dataflow.DataFlow
21+
import semmle.code.cpp.dataflow.new.DataFlow
2222
import NonArrayPointerToArrayIndexingExprFlow::PathGraph
2323

2424
/**

c/cert/test/rules/ARR37-C/DoNotUsePointerArithmeticOnNonArrayObjectPointers.expected

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql:28,60-68)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql:29,22-30)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql:41,20-28)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql:49,26-34)
5-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql:70,3-11)
61
edges
7-
| test.c:14:38:14:39 | p1 | test.c:18:10:18:11 | v1 | provenance | |
8-
| test.c:14:38:14:39 | p1 | test.c:19:10:19:11 | v2 | provenance | |
2+
| test.c:14:38:14:39 | p1 | test.c:16:13:16:14 | p1 | provenance | |
3+
| test.c:14:38:14:39 | p1 | test.c:17:13:17:14 | p1 | provenance | |
94
| test.c:14:38:14:39 | p1 | test.c:20:10:20:11 | p1 | provenance | |
105
| test.c:14:38:14:39 | p1 | test.c:21:10:21:11 | p1 | provenance | |
116
| test.c:14:38:14:39 | p1 | test.c:22:9:22:10 | p1 | provenance | |
127
| test.c:14:38:14:39 | p1 | test.c:23:13:23:14 | p1 | provenance | |
138
| test.c:14:38:14:39 | p1 | test.c:24:9:24:10 | p1 | provenance | |
149
| test.c:14:38:14:39 | p1 | test.c:25:9:25:10 | p1 | provenance | |
10+
| test.c:16:13:16:14 | p1 | test.c:18:10:18:13 | ... ++ | provenance | |
11+
| test.c:17:13:17:14 | p1 | test.c:19:10:19:13 | ... -- | provenance | |
1512
| test.c:51:30:51:38 | & ... | test.c:14:38:14:39 | p1 | provenance | |
1613
nodes
1714
| test.c:14:38:14:39 | p1 | semmle.label | p1 |
18-
| test.c:18:10:18:11 | v1 | semmle.label | v1 |
19-
| test.c:19:10:19:11 | v2 | semmle.label | v2 |
15+
| test.c:16:13:16:14 | p1 | semmle.label | p1 |
16+
| test.c:17:13:17:14 | p1 | semmle.label | p1 |
17+
| test.c:18:10:18:13 | ... ++ | semmle.label | ... ++ |
18+
| test.c:19:10:19:13 | ... -- | semmle.label | ... -- |
2019
| test.c:20:10:20:11 | p1 | semmle.label | p1 |
2120
| test.c:21:10:21:11 | p1 | semmle.label | p1 |
2221
| test.c:22:9:22:10 | p1 | semmle.label | p1 |
@@ -32,8 +31,8 @@ nodes
3231
| test.c:51:30:51:38 | & ... | semmle.label | & ... |
3332
subpaths
3433
#select
35-
| test.c:18:10:18:11 | v1 | test.c:51:30:51:38 | & ... | test.c:18:10:18:11 | v1 | Pointer arithmetic on non-array object pointer. |
36-
| test.c:19:10:19:11 | v2 | test.c:51:30:51:38 | & ... | test.c:19:10:19:11 | v2 | Pointer arithmetic on non-array object pointer. |
34+
| test.c:18:10:18:13 | ... ++ | test.c:51:30:51:38 | & ... | test.c:18:10:18:13 | ... ++ | Pointer arithmetic on non-array object pointer. |
35+
| test.c:19:10:19:13 | ... -- | test.c:51:30:51:38 | & ... | test.c:19:10:19:13 | ... -- | Pointer arithmetic on non-array object pointer. |
3736
| test.c:20:10:20:11 | p1 | test.c:51:30:51:38 | & ... | test.c:20:10:20:11 | p1 | Pointer arithmetic on non-array object pointer. |
3837
| test.c:21:10:21:11 | p1 | test.c:51:30:51:38 | & ... | test.c:21:10:21:11 | p1 | Pointer arithmetic on non-array object pointer. |
3938
| test.c:22:9:22:10 | p1 | test.c:51:30:51:38 | & ... | test.c:22:9:22:10 | p1 | Pointer arithmetic on non-array object pointer. |

0 commit comments

Comments
 (0)