]> wimlib.net Git - wimlib/blobdiff - src/xml.c
Update version number to 1.3.1
[wimlib] / src / xml.c
index 6515ee989f2c89e51c7eb42090fb9174ee4554eb..268b9d9ec2c81b09e5b4e8d57973649bef8ffc5d 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -155,7 +155,7 @@ static int
 node_get_string(const xmlNode *string_node, utf8char **str)
 {
        xmlNode *child;
-       char *p = NULL;
+       utf8char *p = NULL;
 
        for_node_child(string_node, child) {
                if (node_is_text(child) && child->content) {
@@ -490,7 +490,7 @@ err:
        return ret;
 }
 
-/* Prints the information contained in a `struct windows_info'. 
+/* Prints the information contained in a `struct windows_info'.
  *
  * Warning: any strings printed here are in UTF-8 encoding.  If the locale
  * character encoding is not UTF-8, the printed strings may be garbled. */
@@ -1074,7 +1074,7 @@ calculate_dentry_statistics(struct wim_dentry *dentry, void *arg)
 
        if (inode->i_nlink >= 2 && dentry_is_first_in_inode(dentry)) {
                for (unsigned i = 0; i < inode->i_num_ads; i++) {
-                       if (inode->i_ads_entries[i].stream_name_len) {
+                       if (inode->i_ads_entries[i].stream_name_nbytes) {
                                lte = inode_stream_lte(inode, i + 1, lookup_table);
                                if (lte) {
                                        info->hard_link_bytes += inode->i_nlink *
@@ -1164,7 +1164,7 @@ void
 print_image_info(const struct wim_info *wim_info, int image)
 {
        const struct image_info *image_info;
-       const char *desc;
+       const utf8char *desc;
        char buf[50];
 
        wimlib_assert(image >= 1 && image <= wim_info->num_images);
@@ -1266,8 +1266,8 @@ read_xml_data(FILE *fp, const struct resource_entry *res_entry,
 
        DEBUG("Parsing XML using libxml2 to create XML tree");
 
-       doc = xmlReadMemory(xml_data, res_entry->size,
-                           "noname.xml", "UTF-16", 0);
+       doc = xmlReadMemory((const char *)xml_data,
+                           res_entry->size, "noname.xml", "UTF-16", 0);
 
        if (!doc) {
                ERROR("Failed to parse XML data");
@@ -1555,7 +1555,7 @@ wimlib_set_image_descripton(WIMStruct *w, int image,
 WIMLIBAPI int
 wimlib_set_image_flags(WIMStruct *w, int image, const utf8char *flags)
 {
-       char *p;
+       utf8char *p;
 
        if (image < 1 || image > w->hdr.image_count) {
                ERROR("%d is not a valid image", image);