LGTM.com - false positive - missed conditional increment of a variable
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
**Description of the false positive**
I keep getting a "Comparison is always false because dif_steering <= 0." error on https://lgtm.com/projects/g/CleverRaven/Cataclysm-DDA/rev/pr-f7153dbafa3dbb084b7793d0d2ac10ebda2bca84
in https://lgtm.com/projects/g/CleverRaven/Cataclysm-DDA/snapshot/912bd27fe5b356ed2a34f3ce5b19e63ad5c9c4cd/files/src/veh_interact.cpp?sort=name&dir=ASC&mode=heatmap#L737, it's clear that dif_steering can be incremented to be more than 5, so this result is in error.
Also, I didn't actually change this part of the file, so I even if there was a false positive, I shouldn't be getting warned about it for this particular PR.
**https://lgtm.com/projects/g/CleverRaven/Cataclysm-DDA/rev/pr-f7153dbafa3dbb084b7793d0d2ac10ebda2bca84
**
貢獻指南
評估
這個 Issue 還沒有評估資料。