Skip to content

Commit 0170b58

Browse files
committed
Convert RULE-22-4 to use the new dataflow library
1 parent 96b3137 commit 0170b58

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

c/misra/src/rules/RULE-22-4/AttemptToWriteToAReadOnlyStream.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import cpp
1515
import codingstandards.c.misra
1616
import codingstandards.cpp.standardlibrary.FileAccess
17-
import semmle.code.cpp.dataflow.DataFlow
17+
import semmle.code.cpp.dataflow.new.DataFlow
1818

1919
module FileDFConfig implements DataFlow::ConfigSig {
2020
predicate isSource(DataFlow::Node source) {
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AttemptToWriteToAReadOnlyStream.ql:19,32-40)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AttemptToWriteToAReadOnlyStream.ql:20,22-30)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AttemptToWriteToAReadOnlyStream.ql:25,20-28)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AttemptToWriteToAReadOnlyStream.ql:31,21-29)
5-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AttemptToWriteToAReadOnlyStream.ql:33,6-14)
6-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AttemptToWriteToAReadOnlyStream.ql:36,28-36)
71
| test.c:10:3:10:9 | call to fprintf | Attempt to write to a $@ opened as read-only. | test.c:9:14:9:18 | call to fopen | stream |
82
| test.c:15:3:15:9 | call to fprintf | Attempt to write to a $@ opened as read-only. | test.c:18:14:18:18 | call to fopen | stream |

0 commit comments

Comments
 (0)