Date: Thu, 18 May 2023 11:41:59 +0000 From: bugzilla-noreply@freebsd.org To: perl@FreeBSD.org Subject: [Bug 271355] textproc/p5-XML-LibXML: fix build with clang 16 Message-ID: <bug-271355-14331-u0wLOYxrvI@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-271355-14331@https.bugs.freebsd.org/bugzilla/> References: <bug-271355-14331@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271355 --- Comment #2 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3Dea9006c8e8ff30532f8ebd66d850cc6= b2b8701b7 commit ea9006c8e8ff30532f8ebd66d850cc6b2b8701b7 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-10 19:19:33 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-05-18 11:36:36 +0000 textproc/p5-XML-LibXML: fix build with clang 16 Clang 16 has a new error about incompatible function types, which shows up when building textproc/p5-XML-LibXML: perl-libxml-mm.c:142:18: error: incompatible function pointer types passing 'void (void *, void *, xmlChar *)' (aka 'void (void *, void *, unsi= gned char *)') to parameter of type 'xmlHashScanner' (aka 'void (*)(void *, void= *, const unsigned char *)') [-Wincompatible-function-pointer-types] xmlHashScan(r, PmmRegistryDumpHashScanner, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/libxml2/libxml/hash.h:213:22: note: passing argume= nt to parameter 'f' here xmlHashScanner f, ^ perl-libxml-mm.c:234:44: error: incompatible function pointer types passing 'void (void *, xmlChar *)' (aka 'void (void *, unsigned char *)') to parameter of type 'xmlHashDeallocator' (aka 'void (*)(void *, const unsigned char *)') [-Wincompatible-function-pointer-types] if( xmlHashRemoveEntry(PmmREGISTRY, name, PmmRegistryHashDeallocator) ) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/libxml2/libxml/hash.h:160:47: note: passing argume= nt to parameter 'f' here xmlHashDeallocator f); ^ perl-libxml-mm.c:301:38: error: incompatible function pointer types passing 'void *(void *, xmlChar *)' (aka 'void *(void *, unsigned char *)')= to parameter of type 'xmlHashCopier' (aka 'void *(*)(void *, const unsigned ch= ar *)') [-Wincompatible-function-pointer-types] reg_copy =3D xmlHashCopy(PmmREGISTRY, PmmRegistryHashCopier); ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/libxml2/libxml/hash.h:208:21: note: passing argume= nt to parameter 'f' here xmlHashCopier f); ^ In all three cases, the libxml2 callback functions require const xmlChar pointers, so fix the parameters in their definitions. PR: 271355 Approved by: portmgr (build fix blanket) MFH: 2023Q2 textproc/p5-XML-LibXML/Makefile | 1 + .../files/patch-perl-libxml-mm.c (new) | 29 ++++++++++++++++++= ++++ 2 files changed, 30 insertions(+) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271355-14331-u0wLOYxrvI>
