Skip to content

Conversation

@hartwork
Copy link
Contributor

@hartworkhartwork commented Oct 4, 2025

Adds on top of #139368 to fix a compiler warning that did not exist prior to the work on #90949.

CC @picnixz

The symptom was: > ./Modules/pyexpat.c:202:1: warning: ‘set_invalid_arg’ defined but not used [-Wunused-function] > 202 | set_invalid_arg(pyexpat_state *state, xmlparseobject *self, const char *errmsg) > | ^~~~~~~~~~~~~~~
@picnixzpicnixz changed the title gh-90949: Amend GH-139368gh-90949: Fix an "unused function" compiler warning introduced in GH-139368Oct 4, 2025
@picnixz
Copy link
Member

I assume the compiler warning is "unused function" right?

@hartwork
Copy link
ContributorAuthor

I assume the compiler warning is "unused function" right?

@picnixz yes, I put details into the commit message.

@picnixz
Copy link
Member

Oups, I didn't see it. My bad. Thanks for the fix!

@picnixzpicnixz changed the title gh-90949: Fix an "unused function" compiler warning introduced in GH-139368gh-90949: Fix an "unused function" compiler warning introduced in GH-139234Oct 4, 2025
@hartwork
Copy link
ContributorAuthor

@picnixz no worries, glad I could help. (The warning showed while working on the backports yesterday where the bundled Expat is not yet at >=2.7.2.)

@picnixzpicnixz enabled auto-merge (squash) October 4, 2025 14:02
@picnixzpicnixz merged commit fc48a3c into python:mainOct 4, 2025
51 checks passed
danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
pythonGH-139234 (python#139558) Fix a compiler warning `-Wunused-function` after f04bea4. The `set_invalid_arg` function in `Modules/pyexpat.c` may be unused if the underlying Expat version is less than 2.4.0.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hartwork@picnixz