Skip to content

Commit 5ee401c

Browse files
committed
Convert FgetsErrorManagement to use the new dataflow library
1 parent e2d44a6 commit 5ee401c

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

c/cert/src/rules/FIO37-C/SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import cpp
1919
import codingstandards.c.cert
2020
import codingstandards.cpp.FgetsErrorManagement
2121
import codingstandards.cpp.Dereferenced
22-
import semmle.code.cpp.dataflow.DataFlow
22+
import semmle.code.cpp.dataflow.new.DataFlow
2323

2424
/*
2525
* CFG nodes that follows a successful call to `fgets`

c/cert/test/rules/FIO40-C/ResetStringsOnFgetsOrFgetwsFailure.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:47,11-19)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:47,31-39)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:48,13-21)
41
| test.c:20:10:20:12 | buf | The buffer is not reset before being referenced following a failed $@. | test.c:15:7:15:11 | call to fgets | call to fgets |
52
| test.c:57:10:57:12 | buf | The buffer is not reset before being referenced following a failed $@. | test.c:52:7:52:11 | call to fgets | call to fgets |
63
| test.c:66:18:66:20 | buf | The buffer is not reset before being referenced following a failed $@. | test.c:61:7:61:11 | call to fgets | call to fgets |

cpp/common/src/codingstandards/cpp/FgetsErrorManagement.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import cpp
7-
import semmle.code.cpp.dataflow.DataFlow
7+
import semmle.code.cpp.dataflow.new.DataFlow
88
import semmle.code.cpp.controlflow.Guards
99

1010
/*

0 commit comments

Comments
 (0)