From fc48a3c9cac5b9e8c6a56ec2294b01a8da9f8dee Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 4 Oct 2025 16:19:06 +0200 Subject: [PATCH] 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. --- Modules/pyexpat.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.47.3