Merging fixes to >1000 bugs across >600 files discovered using the static analysis tool cppcheck and fixed manually.
The most common:
1. Postincremented iterators. Postincrementing an iterator requires copying the iterator. It can be slow. Unless you use the original value, this is simply not correct; preincrementing is superior.
2. Variables declared and/or initialized but not used.
3. Variables initialized and then re-initialized without using the original value
4. Variables given too great a scope
5. Mis-used standard library functions (most commonly, the return value of unique was not used, so all the redundant values were still in the container)