mirror of
https://github.com/github/codeql.git
synced 2026-01-29 06:12:58 +01:00
Fix tests for NegativeLengthCheck.
This commit is contained in:
@@ -4,4 +4,3 @@
|
||||
| main.go:18:5:18:22 | ...<=... | 'len' is always non-negative, and hence cannot be less than -1. |
|
||||
| main.go:22:5:22:22 | ...==... | 'len' is always non-negative, and hence cannot equal -1. |
|
||||
| main.go:28:9:28:13 | ...<... | This unsigned value is always non-negative, and hence cannot be less than 0. |
|
||||
| main.go:36:9:36:15 | ...==... | This unsigned value is always non-negative, and hence cannot equal -1. |
|
||||
|
||||
@@ -31,7 +31,3 @@ func checkNegative(x uint) bool {
|
||||
func checkNonPositive(x uint) bool {
|
||||
return x <= 0 // OK
|
||||
}
|
||||
|
||||
func checkIsMinusOne(x uint) bool {
|
||||
return x == -1 // NOT OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user