Some minor error and warning fixes for MinGW and MSVC

I hope the line endings are right now.