Run "make cppcheck" (requires cppcheck to be installed, obviously), pick an issue, fix it (unless it's a false positive, of course). Lather, rinse, repeat :-)
Note: don't touch inc/, unless it's absolutely clear that the change doesn't change API/ABI!