https://github.com/python/cpython/commit/fc48a3c9cac5b9e8c6a56ec2294b01a8da9f8dee
commit: fc48a3c9cac5b9e8c6a56ec2294b01a8da9f8dee
branch: main
author: Sebastian Pipping <[email protected]>
committer: picnixz <[email protected]>
date: 2025-10-04T14:19:06Z
summary:
gh-90949: Fix an "unused function" compiler warning introduced in GH-139234
(#139558)
Fix a compiler warning `-Wunused-function` after
f04bea44c37793561d753dd4ca6e7cd658137553.
The `set_invalid_arg` function in `Modules/pyexpat.c` may be unused if the
underlying Expat
version is less than 2.4.0.
files:
M Modules/pyexpat.c
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 7f6d84ad8641ca..9949e185dce9c7 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -198,12 +198,14 @@ set_error(pyexpat_state *state, xmlparseobject *self,
enum XML_Error code)
return NULL;
}
+#if XML_COMBINED_VERSION >= 20400
static PyObject *
set_invalid_arg(pyexpat_state *state, xmlparseobject *self, const char *errmsg)
{
SET_XML_ERROR(state, self, XML_ERROR_INVALID_ARGUMENT, errmsg);
return NULL;
}
+#endif
#undef SET_XML_ERROR
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]