Enable compiler warnings and fix resulting errors
Merge pull request #448 from lienboe/1.6.fix_warnings

Enable & fixup compiler warnings.