cppcheck variable scoping reductions.
cppcheck format string corrections.