]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.c
debian/: update
[wimlib] / src / lookup_table.c
index 15f5c0830c382fb501d9dc13ff5dbcc3513f85a8..fee0f247f96d935c6b3a82b7434747c7a3151ec0 100644 (file)
@@ -484,7 +484,7 @@ read_wim_lookup_table(WIMStruct *wim)
        size_t num_entries;
        struct wim_lookup_table *table;
        struct wim_lookup_table_entry *cur_entry, *duplicate_entry;
-       struct wim_lookup_table_entry_disk *buf;
+       void *buf;
 
        BUILD_BUG_ON(sizeof(struct wim_lookup_table_entry_disk) !=
                     WIM_LOOKUP_TABLE_ENTRY_DISK_SIZE);
@@ -499,8 +499,7 @@ read_wim_lookup_table(WIMStruct *wim)
 
 
        /* Read the lookup table into a buffer.  */
-       ret = res_entry_to_data(&wim->hdr.lookup_table_res_entry, wim,
-                               (void**)&buf);
+       ret = res_entry_to_data(&wim->hdr.lookup_table_res_entry, wim, &buf);
        if (ret)
                goto out;
 
@@ -516,7 +515,8 @@ read_wim_lookup_table(WIMStruct *wim)
         * on-disk lookup table.  */
        wim->current_image = 0;
        for (i = 0; i < num_entries; i++) {
-               const struct wim_lookup_table_entry_disk *disk_entry = &buf[i];
+               const struct wim_lookup_table_entry_disk *disk_entry =
+                       &((const struct wim_lookup_table_entry_disk*)buf)[i];
 
                cur_entry = new_lookup_table_entry();
                if (!cur_entry) {
@@ -918,24 +918,6 @@ wimlib_iterate_lookup_table(WIMStruct *wim, int flags,
        return for_lookup_table_entry(wim->lookup_table, do_iterate_lte, &ctx);
 }
 
-static int
-do_print_lookup_table_entry(struct wim_lookup_table_entry *lte, void *fp)
-{
-       print_lookup_table_entry(lte, (FILE*)fp);
-       return 0;
-}
-
-/* API function documented in wimlib.h  */
-WIMLIBAPI void
-wimlib_print_lookup_table(WIMStruct *wim)
-{
-       for (int i = 0; i < wim->hdr.image_count; i++)
-               print_lookup_table_entry(wim->image_metadata[i]->metadata_lte, stdout);
-       for_lookup_table_entry(wim->lookup_table,
-                              do_print_lookup_table_entry,
-                              stdout);
-}
-
 /* Given a SHA1 message digest, return the corresponding entry in the WIM's
  * lookup table, or NULL if there is none.  */
 struct wim_lookup_table_entry *