Merge pull request #449 from unknownbrackets/warnings

64-bit warning fixes
More warning fixes, switches and printfs, etc.

This time ones not reported by Visual Studio.