win32: various win32 warnings and fixups