diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-01-16 19:01:33 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-01-16 21:23:07 -0800 |
commit | 83a00a54b6fbcfed74d2b3d96ccde5722cd028a2 (patch) | |
tree | c9731a9bd129f13db62a9e9aff68f982d3263878 /meta-perl/recipes-perl/libxml/libxml-libxml-perl | |
parent | 095e86660fe2993f08a141146ce3fae01af4db02 (diff) | |
download | meta-openembedded-83a00a54b6fbcfed74d2b3d96ccde5722cd028a2.tar.gz |
libxml-libxml-perl: Fix function pointer types
Newer clang is warning about this.
Fixes -Wincompatible-function-pointer-types
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-perl/recipes-perl/libxml/libxml-libxml-perl')
-rw-r--r-- | meta-perl/recipes-perl/libxml/libxml-libxml-perl/0001-libxml-mm-Fix-function-prototypes-in-function-pointe.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-perl/recipes-perl/libxml/libxml-libxml-perl/0001-libxml-mm-Fix-function-prototypes-in-function-pointe.patch b/meta-perl/recipes-perl/libxml/libxml-libxml-perl/0001-libxml-mm-Fix-function-prototypes-in-function-pointe.patch new file mode 100644 index 0000000000..7ff61c5709 --- /dev/null +++ b/meta-perl/recipes-perl/libxml/libxml-libxml-perl/0001-libxml-mm-Fix-function-prototypes-in-function-pointe.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 25451c0a56ef8d3b32fd23847bef516486bd8ed4 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 | ||
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 | Upstream-Status: Submitted [https://github.com/shlomif/perl-XML-LibXML/pull/75] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | perl-libxml-mm.c | 6 +++--- | ||
16 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/perl-libxml-mm.c b/perl-libxml-mm.c | ||
19 | index 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 | -- | ||
50 | 2.39.0 | ||
51 | |||