Module: kamailio
Branch: master
Commit: 03726a3f04f860ead060ad2f7984b587ad10ab43
URL:
https://github.com/kamailio/kamailio/commit/03726a3f04f860ead060ad2f7984b58…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2022-04-15T13:23:49+02:00
ims_registrar_scscf: fix build warning
userdata_parser.c: In function
'parse_user_data':
userdata_parser.c:930:23: warning: pointer targets in passing argument 1
of 'xmlParseMemory' differ in signedness [-Wpointer-sign]
930 | doc = xmlParseMemory((unsigned char *)xml.s, xml.len);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| unsigned char *
In file included from /usr/include/libxml2/libxml/globals.h:18,
from /usr/include/libxml2/libxml/threads.h:35,
from /usr/include/libxml2/libxml/xmlmemory.h:218,
from /usr/include/libxml2/libxml/tree.h:1307,
from /usr/include/libxml2/libxml/xmlschemas.h:19,
from userdata_parser.h:47,
from userdata_parser.c:44:
/usr/include/libxml2/libxml/parser.h:846:32: note: expected 'const char
*' but argument is of type 'unsigned char *'
846 | xmlParseMemory (const char *buffer,
| ~~~~~~~~~~~~^~~~~~
---
Modified: src/modules/ims_registrar_scscf/userdata_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/03726a3f04f860ead060ad2f7984b58…
Patch:
https://github.com/kamailio/kamailio/commit/03726a3f04f860ead060ad2f7984b58…
---
diff --git a/src/modules/ims_registrar_scscf/userdata_parser.c
b/src/modules/ims_registrar_scscf/userdata_parser.c
index d8b08b5491..43a5657c5b 100644
--- a/src/modules/ims_registrar_scscf/userdata_parser.c
+++ b/src/modules/ims_registrar_scscf/userdata_parser.c
@@ -927,7 +927,7 @@ ims_subscription *parse_user_data(str xml)
if (!ctxtInit) parser_init(scscf_user_data_dtd,scscf_user_data_xsd);
doc=0;
- doc = xmlParseMemory((unsigned char *)xml.s, xml.len);
+ doc = xmlParseMemory(xml.s, xml.len);
if (!doc){
LM_ERR("This is not a valid XML <%.*s>\n", xml.len,xml.s);
goto error;