Commit c56188d
committed
lex: 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 e2833d3 commit c56188d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
884 | | - | |
| 884 | + | |
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
| |||
0 commit comments