projects/guix·blob java-team · refs

49 lines · 2.0 KiB

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