Fix cppcheck warnings.

Refs #10061