Skip to content

GH-131296: fix clang-cl warnings in sysmodule.c #131304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 20, 2025

Conversation

chris-eibl
Copy link
Member

@chris-eibl chris-eibl commented Mar 15, 2025

@@ -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 };
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, this generated 3 times

warning : suggest braces around initialization of subobject [-Wmissing-braces]

Doubled/or trippled, because compiled in the _freeze_module, too.

@@ -2527,8 +2527,9 @@ sys__is_gil_enabled_impl(PyObject *module)
#endif
}


#ifndef MS_WINDOWS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix warning : unused variable 'perf_map_state' [-Wunused-variable]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was fixed by 486d537, you can now revert the change which just removes an empty line, no?

@chris-eibl
Copy link
Member Author

Rebased, because #131487 partly touched it

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vstinner vstinner enabled auto-merge (squash) March 20, 2025 16:24
@vstinner vstinner merged commit a2ea417 into python:main Mar 20, 2025
47 checks passed
@chris-eibl chris-eibl deleted the fix_clangcl_sysmodule branch March 20, 2025 16:31
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants