Skip to content

Commit 88f80e4

Browse files
committed
C++: Silence two more QL compiler warnings
One was for an unused parameter (a deliberate CP of `Type` x `VoidType`), and one was for use of a deprecated predicate.
1 parent ab6dc1d commit 88f80e4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ predicate readStep(Node node1, Content f, Node node2) {
128128
* numeric conversions, and otherwise the erasure is used.
129129
*/
130130
RefType getErasedRepr(Type t) {
131+
t = t and // silence compiler warning
131132
result instanceof VoidType // stub implementation
132133
}
133134

cpp/ql/src/semmle/code/cpp/ir/internal/PrintIRImpl.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ class PrintableFunctionIR extends PrintableIRNode, TPrintableFunctionIR {
8383
override int getOrder() {
8484
this = rank[result + 1](PrintableFunctionIR orderedFunc, Location location |
8585
location = orderedFunc.getFunctionIR().getLocation() |
86-
orderedFunc order by location.getFile().getURL(), location.getStartLine(),
86+
orderedFunc order by location.getFile().getAbsolutePath(),
87+
location.getStartLine(),
8788
location.getStartColumn(), orderedFunc.getLabel()
8889
)
8990
}

0 commit comments

Comments
 (0)