Skip to content

Commit c8a0a86

Browse files
author
Dave Bartolomeo
committed
Fix Code Scanning warning
1 parent 7623b3d commit c8a0a86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/semantic/SemanticType.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ predicate conversionCannotOverflow(SemNumericType fromType, SemNumericType toTyp
258258
fromType = toType
259259
or
260260
// Treat any cast to an FP type as safe. It can lose precision, but not overflow.
261-
toType instanceof SemFloatingPointType
261+
toType instanceof SemFloatingPointType and fromType = any(SemNumericType n)
262262
or
263263
exists(SemIntegerType fromInteger, SemIntegerType toInteger, int fromSize, int toSize |
264264
fromInteger = fromType and

0 commit comments

Comments
 (0)