@@ -96,14 +96,14 @@ xml2jsonc_convert_elements(xmlNode *anode, json_object *jobj)
9696 {
9797 /* JSON string object */
9898 cur_jobj = json_object_new_object ();
99- cur_jstr = json_object_new_string (xmlNodeGetContent (cur_node ));
100- json_object_object_add (jobj , cur_node -> name , cur_jstr );
99+ cur_jstr = json_object_new_string (( const char * ) xmlNodeGetContent (cur_node ));
100+ json_object_object_add (jobj , ( const char * ) cur_node -> name , cur_jstr );
101101 }
102102 else
103103 {
104104 /* JSON object */
105105 cur_jobj = json_object_new_object ();
106- json_object_object_add (jobj , cur_node -> name , json_object_get (cur_jobj ));
106+ json_object_object_add (jobj , ( const char * ) cur_node -> name , json_object_get (cur_jobj ));
107107 }
108108 }
109109 xml2jsonc_convert_elements (cur_node -> children , cur_jobj );
@@ -2375,17 +2375,16 @@ PARSER_Parse(v2IPTables)
23752375 * added 2021-02-01 by [email protected] 23762376 */
23772377PARSER_Parse (XML )
2378- const size_t i = * offs ;
23792378 xmlDocPtr doc = NULL ;
23802379 xmlNodePtr root_element = NULL ;
23812380
23822381 /* Find the last occurence of '>' in the string */
23832382 char * pch ;
2384- pch = strrchr ((xmlChar * ) npb -> str + * offs , '>' );
2383+ pch = strrchr ((const char * ) npb -> str + * offs , '>' );
23852384
23862385 /* Truncate the string after the last occurence of '>' */
23872386 int newLen = pch - (npb -> str + * offs ) + 1 ;
2388- xmlChar * const cstr = strndup (npb -> str + * offs , newLen );
2387+ char * cstr = strndup (npb -> str + * offs , newLen );
23892388 CHKN (cstr );
23902389
23912390 doc = xmlParseDoc ((xmlChar * ) cstr );
0 commit comments