Fix windows warnings

Reduce the number of warnings when compiling on Windows.