From: Sebastian Pipping Date: Sat, 4 Oct 2025 14:19:06 +0000 (+0200) Subject: gh-90949: Fix an "unused function" compiler warning introduced in GH-139234 (#139558) X-Git-Tag: v3.15.0a1~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc48a3c9cac5b9e8c6a56ec2294b01a8da9f8dee;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 7f6d84ad8641..9949e185dce9 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