Fix compilation warnings on windows
Start to fix #769 (closed)
This merge request does not get rid of the pragma directives, so some warnings are still disabled, but it compiles without warnings.
We can iterate from there to get rid of the pragma directives.