Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn on always false integer reads and comparisons.
When reading an integer of a specific size and comparing it to an integer of a larger size where any of the upper bits are set we will now emit a warning because the comparison is always false. These will always evaluate to false because the "extra" bytes are non-zero: uint8(0) == 0x1100 uint16(0) == 0x110000 uint32(0) == 0x1100000000 While I'm here, move a test into a better place for it. I added it in the wrong place in ccbc405. Fixes VirusTotal#1918.
- Loading branch information