Fixed static analysis warnings

There is still one warning in PetscDMMoose, but it is coming from sections of the code that have calls to CHKERRQ(ierr), so I am thinking that the analyzer isn't following the PETSc macro.

(closes #3829)