refs #5226 Removed redundant code (and fix Unix warnings)