summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-08-15 08:19:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-08-15 11:17:41 +0200
commitae7efecd240eb5c035183b47c08b2ba6b1b78570 (patch)
treee2a04bc54d5cc3d4ded83d6cd9b3aa2579536d24
parentexternal/cairo: Fix -Wincompatible-function-pointer-types (diff)
downloadcore-ae7efecd240eb5c035183b47c08b2ba6b1b78570.tar.gz
core-ae7efecd240eb5c035183b47c08b2ba6b1b78570.zip
external/lxml: Fix -Wincompatible-function-pointer-types
...with recent Clang 16 trunk since <https://github.com/llvm/llvm-project/commit/af01f717c48f0fd2481600ed6c00441763365b62> "Default implicit function pointer conversions diagnostic to be an error", causing > src/lxml/etree.c:175589:60: error: incompatible function pointer types passing 'void (void *, void *, xmlChar *)' (aka 'void (void *, void *, unsigned char *)') to parameter of type 'xmlHashScanner' (aka 'void (*)(void *, void *, const unsigned char *)') [-Wincompatible-function-pointer-types] > xmlHashScan(__pyx_v_self->__pyx_base._xpathCtxt->nsHash, __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces, __pyx_v_self->__pyx_base._xpathCtxt); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnpackedTarball/libxml2/include/libxml/hash.h:213:22: note: passing argument to parameter 'f' here > xmlHashScanner f, > ^ Change-Id: I2a359ed0dfdfa83b49fb03f447967a6d0ff73989 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138266 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--external/lxml/UnpackedTarball_lxml.mk6
-rw-r--r--external/lxml/Wincompatible-function-pointer-types.patch20
2 files changed, 26 insertions, 0 deletions
diff --git a/external/lxml/UnpackedTarball_lxml.mk b/external/lxml/UnpackedTarball_lxml.mk
index bfb5dc2b046f..3f4180404870 100644
--- a/external/lxml/UnpackedTarball_lxml.mk
+++ b/external/lxml/UnpackedTarball_lxml.mk
@@ -11,4 +11,10 @@ $(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/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..bb9c7a02918b
--- /dev/null
+++ b/external/lxml/Wincompatible-function-pointer-types.patch
@@ -0,0 +1,20 @@
+--- src/lxml/etree.c
++++ src/lxml/etree.c
+@@ -6810,7 +6810,7 @@
+ static void __pyx_f_4lxml_5etree__xpath_function_call(xmlXPathParserContext *, int); /*proto*/
+ static int __pyx_f_4lxml_5etree__register_xpath_function(void *, PyObject *, PyObject *); /*proto*/
+ static int __pyx_f_4lxml_5etree__unregister_xpath_function(void *, PyObject *, PyObject *); /*proto*/
+-static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *, void *, xmlChar *); /*proto*/
++static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *, void *, xmlChar const *); /*proto*/
+ static PyObject *__pyx_f_4lxml_5etree__initXSLTResolverContext(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *, struct __pyx_obj_4lxml_5etree__BaseParser *); /*proto*/
+ static xmlDoc *__pyx_f_4lxml_5etree__xslt_resolve_from_python(const xmlChar *, void *, int, int *); /*proto*/
+ static void __pyx_f_4lxml_5etree__xslt_store_resolver_exception(const xmlChar *, void *, xsltLoadType); /*proto*/
+@@ -175892,7 +175892,7 @@
+ * c_href = <const_xmlChar*> _c_href
+ */
+
+-static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__pyx_v__c_href, void *__pyx_v__ctxt, xmlChar *__pyx_v_c_prefix) {
++static void __pyx_f_4lxml_5etree__registerExsltFunctionsForNamespaces(void *__pyx_v__c_href, void *__pyx_v__ctxt, xmlChar const *__pyx_v_c_prefix) {
+ const xmlChar *__pyx_v_c_href;
+ xmlXPathContext *__pyx_v_ctxt;
+ __Pyx_RefNannyDeclarations