I was able to spot 13 of these errors -- although the page only counted that as 10 as it's very picky of which token constitutes the error.
PVS Studio (and CppCat) are great tools. I can't unfortunately use them as I don't write stuff for Windows.
I was able to spot 13 of these errors -- although the page only counted that as 10 as it's very picky of which token constitutes the error.
PVS Studio (and CppCat) are great tools. I can't unfortunately use them as I don't write stuff for Windows.
In addition to them, I also use Coverity (they offer free licenses for open source projects) and Coccinelle (although it's a tool to refactor/create semantic patches, can be also used to find defects if you know what you're looking for -- useful if you fix one bug and you're wondering if there are more like it lurking).
Having different opinions about your codebase is often good as the approach in finding defects is usually different between them. For instance, stuff by the PVS people seem pretty good to find copy/paste mistakes, which I've rarely found with other tools.