Skip to content

Commit 8461696

Browse files
committed
Remove data flow imports from queries that do not actually use it
1 parent 94d7114 commit 8461696

24 files changed

+20
-34
lines changed

c/cert/src/rules/CON30-C/CleanUpThreadSpecificStorage.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.Concurrency
18-
import semmle.code.cpp.dataflow.TaintTracking
1918
import semmle.code.cpp.dataflow.DataFlow
2019

2120
module TssCreateToTssDeleteConfig implements DataFlow::ConfigSig {

c/cert/src/rules/CON34-C/AppropriateThreadObjectStorageDurations.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.Concurrency
18-
import semmle.code.cpp.dataflow.TaintTracking
1918
import semmle.code.cpp.dataflow.DataFlow
2019
import semmle.code.cpp.commons.Alloc
2120

c/cert/src/rules/CON34-C/ThreadObjectStorageDurationsNotInitialized.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import cpp
1717
import codingstandards.c.cert
1818
import codingstandards.cpp.Concurrency
19-
import semmle.code.cpp.dataflow.TaintTracking
2019
import semmle.code.cpp.dataflow.DataFlow
2120

2221
from TSSGetFunctionCall tsg, ThreadedFunction tf

c/cert/src/rules/ERR30-C/ErrnoReadBeforeReturn.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.c.Errno
17+
import semmle.code.cpp.dataflow.DataFlow
1718

1819
/**
1920
* A call to an `OutOfBandErrnoSettingFunction`

c/cert/src/rules/ERR30-C/FunctionCallBeforeErrnoCheck.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.c.Errno
17-
import semmle.code.cpp.dataflow.DataFlow
1817

1918
/**
2019
* A call to an `OutOfBandErrnoSettingFunction`

c/cert/src/rules/ERR30-C/SetlocaleMightSetErrno.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import cpp
1414
import codingstandards.c.cert
1515
import codingstandards.c.Errno
16+
import semmle.code.cpp.dataflow.DataFlow
1617

1718
class SetlocaleFunctionCall extends FunctionCall {
1819
SetlocaleFunctionCall() { this.getTarget().hasGlobalName("setlocale") }

c/cert/src/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.SideEffect
17-
import semmle.code.cpp.dataflow.DataFlow
1817
import semmle.code.cpp.dataflow.TaintTracking
1918
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
2019

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

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

1919
/*
2020
* CFG nodes that follows a successful call to `fgets`

c/cert/test/rules/CON30-C/CleanUpThreadSpecificStorage.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:21,46-54)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:22,22-30)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:31,20-28)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:41,35-43)
5-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:49,36-44)
6-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:51,36-44)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:20,46-54)
2+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:21,22-30)
3+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:30,20-28)
4+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:40,35-43)
5+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:48,36-44)
6+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (CleanUpThreadSpecificStorage.ql:50,36-44)
77
| test.c:27:3:27:12 | call to tss_create | Resources used by thread specific storage may not be cleaned up. |
88
| test.c:49:3:49:12 | call to tss_create | Resources used by thread specific storage may not be cleaned up. |
99
| test.c:71:3:71:12 | call to tss_create | Resources used by thread specific storage may not be cleaned up. |

c/cert/test/rules/CON34-C/AppropriateThreadObjectStorageDurations.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:28,29-37)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:28,54-62)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:35,62-70)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:27,29-37)
2+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:27,54-62)
3+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:34,62-70)
4+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:39,5-13)
5+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:39,30-38)
46
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:40,5-13)
57
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:40,30-38)
6-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:41,5-13)
7-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:41,30-38)
8-
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:28,3-16)
8+
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (AppropriateThreadObjectStorageDurations.ql:27,3-16)
99
| test.c:23:3:23:13 | call to thrd_create | $@ not declared with appropriate storage duration | test.c:23:24:23:29 | & ... | Shared object |
1010
| test.c:74:3:74:13 | call to thrd_create | $@ not declared with appropriate storage duration | test.c:74:24:74:24 | p | Shared object |
1111
| test.c:85:3:85:13 | call to thrd_create | $@ not declared with appropriate storage duration | test.c:85:24:85:24 | p | Shared object |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:28,38-46)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:27,38-46)
2+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:30,5-13)
3+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:30,30-38)
24
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:31,5-13)
35
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:31,30-38)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:32,5-13)
5-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ThreadObjectStorageDurationsNotInitialized.ql:32,30-38)
66
| test.c:14:7:14:13 | call to tss_get | Call to a thread specific storage function from within a threaded context on an object that may not be owned by this thread. |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ErrnoReadBeforeReturn.ql:40,7-15)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ErrnoReadBeforeReturn.ql:41,7-15)
22
| test.c:69:7:69:11 | * ... | Do not read `errno` before checking the return value of function $@. | test.c:68:3:68:7 | call to ftell | call to ftell |
33
| test.c:69:7:69:11 | call to __errno_location | Do not read `errno` before checking the return value of function $@. | test.c:68:3:68:7 | call to ftell | call to ftell |
44
| test.c:70:5:70:10 | call to perror | Do not read `errno` before checking the return value of function $@. | test.c:68:3:68:7 | call to ftell | call to ftell |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (SetlocaleMightSetErrno.ql:64,7-15)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (SetlocaleMightSetErrno.ql:65,7-15)
22
| test.c:98:3:98:11 | call to setlocale | Do not read `errno` before checking the return value of a call to `setlocale`. |
33
| test.c:104:7:104:15 | call to setlocale | The value of `errno` may be different than `0` when `setlocale` is called. The following `errno` check might be invalid. |

c/common/src/codingstandards/c/Errno.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/** Provides a library for errno-setting functions. */
22

33
import cpp
4-
import semmle.code.cpp.dataflow.DataFlow
54

65
/**
76
* An errno-setting function

c/misra/src/rules/RULE-17-7/ValueReturnedByAFunctionNotUsed.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import cpp
1515
import codingstandards.c.misra
16-
import semmle.code.cpp.dataflow.DataFlow
1716

1817
from Call c
1918
where

c/misra/src/rules/RULE-19-1/ObjectCopiedToAnOverlappingObject.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import cpp
1414
import codingstandards.c.misra
1515
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
16-
import semmle.code.cpp.dataflow.DataFlow
1716

1817
/**
1918
* Offset in bytes of a field access

cpp/autosar/src/rules/A18-5-2/DoNotUseNonPlacementNew.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import cpp
1717
import codingstandards.cpp.autosar
18-
import semmle.code.cpp.dataflow.DataFlow
1918

2019
from NewOrNewArrayExpr na
2120
where

cpp/autosar/src/rules/A8-4-4/FunctionReturnMultipleValueCondition.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import cpp
1818
import codingstandards.cpp.autosar
19-
import semmle.code.cpp.dataflow.DataFlow
2019

2120
abstract class OutputValue extends Element {
2221
abstract string getOutputName();

cpp/autosar/src/rules/M5-2-2/PointerToAVirtualBaseClassCastToAPointer.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import cpp
1717
import codingstandards.cpp.autosar
18-
import semmle.code.cpp.dataflow.DataFlow
1918

2019
from Cast cast, VirtualBaseClass castFrom, Class castTo
2120
where

cpp/common/src/codingstandards/cpp/lifetimes/lifetimeprofile/LifetimeProfile.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import cpp
2-
private import semmle.code.cpp.dataflow.DataFlow
32
private import semmle.code.cpp.controlflow.Nullness
43
private import codingstandards.cpp.Dereferenced
54
private import codingstandards.cpp.Expr

cpp/common/src/codingstandards/cpp/rules/accessofundefinedmemberthroughnullpointer/AccessOfUndefinedMemberThroughNullPointer.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import codingstandards.cpp.Customizations
77
import codingstandards.cpp.Exclusions
88
import codingstandards.cpp.Nullness
99
import codingstandards.cpp.Expr
10-
import semmle.code.cpp.dataflow.DataFlow
1110
import NullPointerToPointerMemberExpressionFlow::PathGraph
1211

1312
abstract class AccessOfUndefinedMemberThroughNullPointerSharedQuery extends Query { }

cpp/common/test/deviations/deviation_permits_basic_test/UnusedReturnValue.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import cpp
1818
import codingstandards.cpp.CodingStandards
19-
import semmle.code.cpp.dataflow.DataFlow
2019
import codingstandards.cpp.exclusions.cpp.RuleMetadata
2120

2221
/* This is a copy of an AUTOSAR rule, which we are using for testing purposes. */

cpp/common/test/deviations/deviations_basic_test/UnusedReturnValue.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import cpp
1818
import codingstandards.cpp.CodingStandards
19-
import semmle.code.cpp.dataflow.DataFlow
2019
import codingstandards.cpp.exclusions.cpp.RuleMetadata
2120

2221
/* This is a copy of an AUTOSAR rule, which we are using for testing purposes. */

cpp/common/test/deviations/deviations_report_deviated/UnusedReturnValue.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import cpp
1818
import codingstandards.cpp.CodingStandards
19-
import semmle.code.cpp.dataflow.DataFlow
2019
import codingstandards.cpp.exclusions.cpp.RuleMetadata
2120

2221
/* This is a copy of an AUTOSAR rule, which we are using for testing purposes. */

0 commit comments

Comments
 (0)