1From 25451c0a56ef8d3b32fd23847bef516486bd8ed4 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Mon, 16 Jan 2023 18:50:10 -0800 4Subject: [PATCH] libxml-mm: Fix function prototypes in function pointers 5 6This is now detected with latest clang16+ 7 8Fixes 9error: 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] 10 xmlHashScan(r, PmmRegistryDumpHashScanner, NULL); 11 12Upstream-Status: Submitted [https://github.com/shlomif/perl-XML-LibXML/pull/75] 13Signed-off-by: Khem Raj <raj.khem@gmail.com> 14--- 15 perl-libxml-mm.c | 6 +++--- 16 1 file changed, 3 insertions(+), 3 deletions(-) 17 18diff --git a/perl-libxml-mm.c b/perl-libxml-mm.c 19index a3e78a2..ec2b5ea 100644 20--- a/perl-libxml-mm.c 21+++ b/perl-libxml-mm.c 22@@ -121,7 +121,7 @@ PmmFreeHashTable(xmlHashTablePtr table) 23 extern SV* PROXY_NODE_REGISTRY_MUTEX; 24 25 /* Utility method used by PmmDumpRegistry */ 26-void PmmRegistryDumpHashScanner(void * payload, void * data, xmlChar * name) 27+void PmmRegistryDumpHashScanner(void * payload, void * data, const xmlChar * name) 28 { 29 LocalProxyNodePtr lp = (LocalProxyNodePtr) payload; 30 ProxyNodePtr node = (ProxyNodePtr) lp->proxy; 31@@ -215,7 +215,7 @@ PmmRegisterProxyNode(ProxyNodePtr proxy) 32 /* PP: originally this was static inline void, but on AIX the compiler 33 did not chew it, so I'm removing the inline */ 34 static void 35-PmmRegistryHashDeallocator(void *payload, xmlChar *name) 36+PmmRegistryHashDeallocator(void *payload, const xmlChar *name) 37 { 38 Safefree((LocalProxyNodePtr) payload); 39 } 40@@ -279,7 +279,7 @@ PmmRegistryREFCNT_dec(ProxyNodePtr proxy) 41 * internal, used by PmmCloneProxyNodes 42 */ 43 void * 44-PmmRegistryHashCopier(void *payload, xmlChar *name) 45+PmmRegistryHashCopier(void *payload, const xmlChar *name) 46 { 47 ProxyNodePtr proxy = ((LocalProxyNodePtr) payload)->proxy; 48 LocalProxyNodePtr lp; 49-- 502.39.0 51 52