Merge pull request #1647 from arrbee/fix-win32-warnings-part-112 Fix Windows warnings and missing prototypes