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