Skip to content

Commit 1aead6b

Browse files
hartworkdanigm
authored andcommitted
pythongh-90949: Fix an "unused function" compiler warning introduced in 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.
1 parent 328e5b9 commit 1aead6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Modules/pyexpat.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,14 @@ set_error(pyexpat_state *state, xmlparseobject *self, enum XML_Error code)
198198
return NULL;
199199
}
200200

201+
#if XML_COMBINED_VERSION >= 20400
201202
static PyObject *
202203
set_invalid_arg(pyexpat_state *state, xmlparseobject *self, const char *errmsg)
203204
{
204205
SET_XML_ERROR(state, self, XML_ERROR_INVALID_ARGUMENT, errmsg);
205206
return NULL;
206207
}
208+
#endif
207209

208210
#undef SET_XML_ERROR
209211

0 commit comments

Comments
 (0)