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