Skip to content

[3.14] Fix a compiler warning in py_list_resize() - #161190

Merged
vstinner merged 1 commit into
python:3.14from
vstinner:list_warn14
Nov 3, 2026
Merged

vstinner merged 1 commit into
python:3.14from
vstinner:list_warn14

Conversation

@vstinner

@vstinner vstinner commented Nov 2, 2026

Copy link
Copy Markdown
Member

Fix a compiler warning when Python is built with the GIL (default) and without C assertions (in release mode). Fix the warning:

Objects/listobject.c: In function 'py_list_resize':
Objects/listobject.c:140:16: warning: unused variable 'allocated'
[-Wunused-variable]
  140 |     Py_ssize_t allocated = self->allocated;

Fix a compiler warning when Python is built with the GIL (default)
and without C assertions (in release mode). Fix the warning:

    Objects/listobject.c: In function 'py_list_resize':
    Objects/listobject.c:140:16: warning: unused variable 'allocated'
    [-Wunused-variable]
      140 |     Py_ssize_t allocated = self->allocated;
@vstinner

vstinner commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

cc @sobolevn

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! There are multiple other ones in Modules/unicodedata.c and in Python/generated_cases.c.h

@vstinner
vstinner merged commit 24520d7 into python:3.14 Nov 3, 2026
57 checks passed
@vstinner
vstinner deleted the list_warn14 branch November 3, 2026 17:31
@vstinner

vstinner commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Merged, thanks for the review.

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