This question already has an answer, but for reference...
You can try PVS-Studio. That's not free, but, IMHO, must have one.
Quote from their site:
PVS-Studio is a tool used to detect bugs in the source code of programs written in C, C++ and C#.
PVS-Studio performs static code analysis and generates a report that helps a programmer find and fix bugs. PVS-Studio does a wide range of code checks; but it is especially useful to search for misprints and Copy-Paste errors.
The analyzer is designed for developers who use Visual Studio.