Commit c462d4e
committed
core: string: Unsigned difference expression compared to zero
Squash CodeQL `cpp/unsigned-difference-expression-compared-zero`
issue.
This rule finds relational comparisons between the result of
an unsigned subtraction and the value `0`. Such comparisons
are likely to be wrong as the value of an unsigned subtraction
can never be negative. So the relational comparison ends up
checking whether the result of the subtraction is equal to 0.
This is probably not what the programmer intended.1 parent c98d3ba commit c462d4e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
| 829 | + | |
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
| |||
0 commit comments