[Python-checkins] Fix compilation warnings on Windows (GH-8627)