File: 0001-libxml-mm-Fix-function-prototypes-in-function-pointe.patch

package info (click to toggle)
libxml-libxml-perl 2.0207%2Bdfsg%2Breally%2B2.0134-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,944 kB
  • sloc: perl: 6,345; ansic: 3,851; xml: 182; makefile: 32; sh: 21
file content (53 lines) | stat: -rw-r--r-- 2,009 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 8751785951fbde48ffa16a476da3e4adb2bbcde5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 16 Jan 2023 18:50:10 -0800
Subject: [PATCH] libxml-mm: Fix function prototypes in function pointers

This is now detected with latest clang16+

Fixes
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]
                xmlHashScan(r, PmmRegistryDumpHashScanner, NULL);

Signed-off-by: Khem Raj <raj.khem@gmail.com>

Bug-Debian: https://bugs.debian.org/1075219

---
 perl-libxml-mm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/perl-libxml-mm.c b/perl-libxml-mm.c
index a3e78a2..ec2b5ea 100644
--- a/perl-libxml-mm.c
+++ b/perl-libxml-mm.c
@@ -121,7 +121,7 @@ PmmFreeHashTable(xmlHashTablePtr table)
 extern SV* PROXY_NODE_REGISTRY_MUTEX;
 
 /* Utility method used by PmmDumpRegistry */
-void PmmRegistryDumpHashScanner(void * payload, void * data, xmlChar * name)
+void PmmRegistryDumpHashScanner(void * payload, void * data, const xmlChar * name)
 {
 	LocalProxyNodePtr lp = (LocalProxyNodePtr) payload;
 	ProxyNodePtr node = (ProxyNodePtr) lp->proxy;
@@ -215,7 +215,7 @@ PmmRegisterProxyNode(ProxyNodePtr proxy)
 /* PP: originally this was static inline void, but on AIX the compiler
    did not chew it, so I'm removing the inline */
 static void
-PmmRegistryHashDeallocator(void *payload, xmlChar *name)
+PmmRegistryHashDeallocator(void *payload, const xmlChar *name)
 {
 	Safefree((LocalProxyNodePtr) payload);
 }
@@ -279,7 +279,7 @@ PmmRegistryREFCNT_dec(ProxyNodePtr proxy)
  * internal, used by PmmCloneProxyNodes
  */
 void *
-PmmRegistryHashCopier(void *payload, xmlChar *name)
+PmmRegistryHashCopier(void *payload, const xmlChar *name)
 {
 	ProxyNodePtr proxy = ((LocalProxyNodePtr) payload)->proxy;
 	LocalProxyNodePtr lp;
-- 
2.45.2