Fixed build error and static analysis warnings

Refs #10092