First batch refs #7808
second batch refs #7808
third batch refs #7808
fixed typo that slipped through refs #7808
Merge remote branch 'origin/feature/7808_cppcheck_errors'