Fixed the error reported by cppcheck. Refs #8880.
Merge remote-tracking branch 'origin/feature/8880_fix_cpp'