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);
/* 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;
* 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) {
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;
-}
-
/* 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 *