Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea2777f

Browse files
committed
update {cs/cpp}/equality-on-floats to use the same alert-message/description
1 parent 55c8863 commit ea2777f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

cpp/ql/src/Likely Bugs/Arithmetic/FloatComparison.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ where
2121
FloatingPointType and
2222
not ro.getAnOperand().isConstant() and // comparisons to constants generate too many false positives
2323
not left.(VariableAccess).getTarget() = right.(VariableAccess).getTarget() // skip self comparison
24-
select ro, "Equality test on floating point values may not behave as expected."
24+
select ro, "Equality checks on floating point values can yield unexpected results."

csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* @name Equality check on floating point values
3-
* @description Equality checks on floating point values can yield unexpected results.
3+
* @description Comparing results of floating-point computations with '==' or
4+
* '!=' is likely to yield surprising results since floating-point
5+
* computation does not follow the standard rules of algebra.
46
* @kind problem
57
* @problem.severity warning
68
* @precision medium

0 commit comments

Comments
 (0)