More warning fixes, switches and printfs, etc.

This time ones not reported by Visual Studio.
Merge pull request #451 from unknownbrackets/warnings

More warning fixes, switches and printfs, etc.