summaryrefslogtreecommitdiff
blob: fda631611216a4a3b5f799ecb185fab8b115669b (plain)
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
From d01c3e8a488282bc8bc2fae5bd21efc6c3931a32 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Jan 2023 14:50:08 -0800
Subject: [PATCH] Fix hash_key_put() signature

Fixes

../xmlstarlet-1.6.1/src/xml_elem.c:271:27: 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(uniq, hash_key_put, &lines);
                          ^~~~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/xml_elem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xml_elem.c b/src/xml_elem.c
index 024e62a..a73038a 100644
--- a/src/xml_elem.c
+++ b/src/xml_elem.c
@@ -186,7 +186,7 @@ typedef struct {
  * put @name into @data->array[@data->offset]
  */
 static void
-hash_key_put(void *payload, void *data, xmlChar *name)
+hash_key_put(void *payload, void *data, const xmlChar *name)
 {
     ArrayDest *dest = data;
     dest->array[dest->offset++] = name;
-- 
2.40.1