issue #4729: some warning fixes and compilation error fixes on win32.