From 0eea6359608adde1c75bd82f34db62c3e8d7eef2 Mon Sep 17 00:00:00 2001 From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Sat, 15 Mar 2025 20:41:21 +0100 Subject: [PATCH 1/2] fix clang-cl warnings in sysmodule.c --- Python/sysmodule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index adaa5ee1c74aa5..8821f6a69be459 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1612,7 +1612,7 @@ sys_getrecursionlimit_impl(PyObject *module) #ifdef MS_WINDOWS -static PyTypeObject WindowsVersionType = {0, 0, 0, 0, 0, 0}; +static PyTypeObject WindowsVersionType = { 0 }; static PyStructSequence_Field windows_version_fields[] = { {"major", "Major version number"}, @@ -2527,8 +2527,9 @@ sys__is_gil_enabled_impl(PyObject *module) #endif } - +#ifndef MS_WINDOWS static PerfMapState perf_map_state; +#endif PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void) { #ifndef MS_WINDOWS From ab05290a1ab98aff94b892b9f50138621d5ecd6f Mon Sep 17 00:00:00 2001 From: Chris Eibl <138194463+chris-eibl@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:03:33 +0100 Subject: [PATCH 2/2] add the additional empty line again --- Python/sysmodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 0c9f8fe15520cf..1b2019a9f74d42 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2529,6 +2529,7 @@ sys__is_gil_enabled_impl(PyObject *module) #endif } + #ifndef MS_WINDOWS static PerfMapState perf_map_state; #endif