Corrected cppcheck errors. Refs #9243.