Files
codeql/ql/test/query-tests/RedundantCode/NegativeLengthCheck/NegativeLengthCheck.expected
Owen Mansel-Chan 97bbdca8a3 Extend negativeLengthCheck query to unsigned integers
Like return values from len and cap, unsigned integers are never negative
2020-08-11 10:48:03 +01:00

8 lines
717 B
Plaintext

| NegativeLengthCheck.go:4:5:4:15 | ...<... | 'len' is always non-negative, and hence cannot be less than 0. |
| main.go:6:5:6:20 | ...<... | 'len' is always non-negative, and hence cannot be less than 0. |
| main.go:14:5:14:20 | ...<... | 'cap' is always non-negative, and hence cannot be less than 0. |
| 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. |