external/lxml/UnpackedTarball_lxml.mk | 3 external/lxml/Wincompatible-function-pointer-types.patch | 83 +++++++++++++++ 2 files changed, 86 insertions(+)
New commits: commit ddbe1f9139c7758c3fd9e5a4b98a55178895ec8b Author: Stephan Bergmann <[email protected]> AuthorDate: Fri Jan 5 15:29:37 2024 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Wed Oct 23 20:51:32 2024 +0200 external/lxml: Silence -Wincompatible-function-pointer-types ...with Clang since <https://github.com/llvm/llvm-project/commit/af01f717c48f0fd2481600ed6c00441763365b62> "Default implicit function pointer conversions diagnostic to be an error", causing > src/lxml/etree.c:113121:38: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] > 113121 | __pyx_v_self->_c_ctxt->sax->serror = __pyx_f_4lxml_5etree__receiveParserError; > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > src/lxml/etree.c:117609:25: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] > 117609 | __pyx_v_sax->serror = __pyx_f_4lxml_5etree__receiveParserError; > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > src/lxml/etree.c:181693:28: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] > 181693 | __pyx_v_xpathCtxt->error = __pyx_f_4lxml_5etree__receiveXPathError; > | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > src/lxml/etree.c:218967:60: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] > 218967 | xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/relaxng.h:156:30: note: passing argument to parameter 'serror' here > 156 | xmlStructuredErrorFunc serror, > | ^ > src/lxml/etree.c:219385:60: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] > 219385 | xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/relaxng.h:185:31: note: passing argument to parameter 'serror' here > 185 | xmlStructuredErrorFunc serror, void *ctx); > | ^ > src/lxml/etree.c:220274:59: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] > 220274 | xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/xmlschemas.h:156:30: note: passing argument to parameter 'serror' here > 156 | xmlStructuredErrorFunc serror, > | ^ > src/lxml/etree.c:220817:59: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] > 220817 | xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/xmlschemas.h:185:30: note: passing argument to parameter 'serror' here > 185 | xmlStructuredErrorFunc serror, > | ^ > src/lxml/etree.c:221582:66: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] > 221582 | xmlSchemaSetValidStructuredErrors(__pyx_v_self->_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_error_log)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/xmlschemas.h:185:30: note: passing argument to parameter 'serror' here > 185 | xmlStructuredErrorFunc serror, > | ^ > src/lxml/etree.c:222759:63: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] > 222759 | xmlSchematronSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/schematron.h:106:31: note: passing argument to parameter 'serror' here > 106 | xmlStructuredErrorFunc serror, > | ^ Change-Id: I98d1861acfe364d8f83aaca26100dc2c9729ec33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161669 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 7a63830a47ce8e74b30a2a2d2e776025397ce390) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175427 Tested-by: Stephan Bergmann <[email protected]> diff --git a/external/lxml/UnpackedTarball_lxml.mk b/external/lxml/UnpackedTarball_lxml.mk index 1b19b6fd1680..4248b978c06a 100644 --- a/external/lxml/UnpackedTarball_lxml.mk +++ b/external/lxml/UnpackedTarball_lxml.mk @@ -11,9 +11,12 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,lxml)) $(eval $(call gb_UnpackedTarball_set_tarball,lxml,$(LXML_TARBALL))) +$(eval $(call gb_UnpackedTarball_set_patchlevel,lxml,0)) + $(eval $(call gb_UnpackedTarball_add_patches,lxml, \ external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1 \ external/lxml/replace-setuptools-with-distutils.patch.1 \ + external/lxml/Wincompatible-function-pointer-types.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/lxml/Wincompatible-function-pointer-types.patch b/external/lxml/Wincompatible-function-pointer-types.patch new file mode 100644 index 000000000000..644082fdc8bc --- /dev/null +++ b/external/lxml/Wincompatible-function-pointer-types.patch @@ -0,0 +1,83 @@ +--- src/lxml/etree.c ++++ src/lxml/etree.c +@@ -113118,7 +113118,7 @@ + * self._orig_loader = _register_document_loader() if set_document_loader else NULL + * if self._validator is not None: + */ +- __pyx_v_self->_c_ctxt->sax->serror = __pyx_f_4lxml_5etree__receiveParserError; ++ __pyx_v_self->_c_ctxt->sax->serror = (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveParserError; + + /* "src/lxml/parser.pxi":587 + * self._doc = None +@@ -117606,7 +117606,7 @@ + * sax.startElementNs = NULL + * sax.endElementNs = NULL + */ +- __pyx_v_sax->serror = __pyx_f_4lxml_5etree__receiveParserError; ++ __pyx_v_sax->serror = (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveParserError; + + /* "src/lxml/parser.pxi":923 + * sax.initialized = xmlparser.XML_SAX2_MAGIC +@@ -181690,7 +181690,7 @@ + * + * @cython.final + */ +- __pyx_v_xpathCtxt->error = __pyx_f_4lxml_5etree__receiveXPathError; ++ __pyx_v_xpathCtxt->error = (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveXPathError; + + /* "src/lxml/extensions.pxi":132 + * return utf +@@ -218964,7 +218964,7 @@ + * parser_ctxt, _receiveError, <void*>self._error_log) + * _connectGenericErrorLog(self._error_log, xmlerror.XML_FROM_RELAXNGP) + */ +- xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); ++ xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); + + /* "src/lxml/relaxng.pxi":92 + * relaxng.xmlRelaxNGSetParserStructuredErrors( +@@ -219382,7 +219382,7 @@ + * valid_ctxt, _receiveError, <void*>self._error_log) + * _connectGenericErrorLog(self._error_log, xmlerror.XML_FROM_RELAXNGV) + */ +- xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); ++ xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); + + /* "src/lxml/relaxng.pxi":134 + * relaxng.xmlRelaxNGSetValidStructuredErrors( +@@ -220271,7 +220271,7 @@ + * parser_ctxt, _receiveError, <void*>self._error_log) + * if self._doc is not None: + */ +- xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); ++ xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); + + /* "src/lxml/xmlschema.pxi":74 + * xmlschema.xmlSchemaSetParserStructuredErrors( +@@ -220814,7 +220814,7 @@ + * valid_ctxt, _receiveError, <void*>self._error_log) + * + */ +- xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); ++ xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); + + /* "src/lxml/xmlschema.pxi":131 + * valid_ctxt, _receiveError, <void*>self._error_log) +@@ -221579,7 +221579,7 @@ + * self._valid_ctxt, _receiveError, <void*>error_log) + * self._sax_plug = xmlschema.xmlSchemaSAXPlug( + */ +- xmlSchemaSetValidStructuredErrors(__pyx_v_self->_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_error_log)); ++ xmlSchemaSetValidStructuredErrors(__pyx_v_self->_valid_ctxt, (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_error_log)); + + /* "src/lxml/xmlschema.pxi":195 + * xmlschema.xmlSchemaSetValidOptions( +@@ -222756,7 +222756,7 @@ + * valid_ctxt, _receiveError, <void*>self._error_log) + * c_doc = _fakeRootDoc(doc._c_doc, root_node._c_node) + */ +- xmlSchematronSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); ++ xmlSchematronSetValidStructuredErrors(__pyx_v_valid_ctxt, (xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); + + /* "src/lxml/schematron.pxi":153 + * schematron.xmlSchematronSetValidStructuredErrors(
