Refs #8958 Sorted complier warnings

there were a couple of "comparison between signed and unsigned int" warnings.

I also changed a couple of autos to const references of thier actual types on martyn's suggestion.