@@ -52,21 +52,21 @@ suscan_object_populate_from_xmlNode(suscan_object_t *object, xmlNode *node)
52
52
53
53
for (this = node -> children ; this != NULL ; this = this -> next ) {
54
54
if (this -> type == XML_ELEMENT_NODE ) {
55
- if ((type = suscan_object_xmltag_to_type (this -> name )) == -1 ) {
55
+ if ((type = suscan_object_xmltag_to_type (( const char * ) this -> name )) == -1 ) {
56
56
SU_ERROR ("Unrecognized tag name `%s'\n" , this -> name );
57
57
goto fail ;
58
58
}
59
59
60
60
/* Create object */
61
61
SU_TRYCATCH (new = suscan_object_new (type ), goto fail );
62
62
63
- if ((attrib = xmlGetProp (this , "name" )) != NULL ) {
63
+ if ((attrib = ( char * ) xmlGetProp (this , ( const xmlChar * ) "name" )) != NULL ) {
64
64
SU_TRYCATCH (suscan_object_set_name (new , attrib ), goto fail );
65
65
xmlFree (attrib );
66
66
attrib = NULL ;
67
67
}
68
68
69
- if ((attrib = xmlGetProp (this , "class" )) != NULL ) {
69
+ if ((attrib = ( char * ) xmlGetProp (this , ( const xmlChar * ) "class" )) != NULL ) {
70
70
SU_TRYCATCH (suscan_object_set_class (new , attrib ), goto fail );
71
71
xmlFree (attrib );
72
72
attrib = NULL ;
@@ -87,8 +87,8 @@ suscan_object_populate_from_xmlNode(suscan_object_t *object, xmlNode *node)
87
87
/* Populate new object */
88
88
if (type == SUSCAN_OBJECT_TYPE_FIELD ) {
89
89
/* Try to find value from member and contents */
90
- if ((attrib = xmlGetProp (this , "value" )) == NULL )
91
- attrib = xmlNodeGetContent (this );
90
+ if ((attrib = ( char * ) xmlGetProp (this , ( const xmlChar * ) "value" )) == NULL )
91
+ attrib = ( char * ) xmlNodeGetContent (this );
92
92
93
93
if (attrib != NULL ) {
94
94
SU_TRYCATCH (suscan_object_set_value (new , attrib ), goto fail );
@@ -140,7 +140,7 @@ suscan_object_from_xml(const char *url, const void *data, size_t size)
140
140
goto done ;
141
141
}
142
142
143
- if (strcmp (root -> name , "serialization" ) != 0 ) {
143
+ if (strcmp (( const char * ) root -> name , "serialization" ) != 0 ) {
144
144
SU_ERROR ("Unexpected root tag `%s' in `%s'\n" , root -> name , url );
145
145
goto done ;
146
146
}
0 commit comments