From 86a40432e041b9877c6f3abed74d1d5f5fc20c11 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 25 Jan 2022 17:08:06 +0100 Subject: [PATCH] [cache] cast --- src/cache/cache.c | 4 ++-- src/cache/dialogs.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cache/cache.c b/src/cache/cache.c index 12cf77883..3fa2d9318 100644 --- a/src/cache/cache.c +++ b/src/cache/cache.c @@ -485,7 +485,7 @@ get_cache_fragment(struct cache_entry *cached) if (list_empty(cached->frag)) return NULL; - first_frag = cached->frag.next; + first_frag = (struct fragment *)cached->frag.next; if (first_frag->offset) return NULL; @@ -637,7 +637,7 @@ delete_entry_content(struct cache_entry *cached) enlarge_entry(cached, -cached->data_size); while (cached->frag.next != (void *) &cached->frag) { - struct fragment *f = cached->frag.next; + struct fragment *f = (struct fragment *)cached->frag.next; del_from_list(f); frag_free(f); diff --git a/src/cache/dialogs.c b/src/cache/dialogs.c index 8b301ede1..84097bdd8 100644 --- a/src/cache/dialogs.c +++ b/src/cache/dialogs.c @@ -48,7 +48,7 @@ is_cache_entry_used(struct listbox_item *item) static char * get_cache_entry_text(struct listbox_item *item, struct terminal *term) { - struct cache_entry *cached = item->udata; + struct cache_entry *cached = (struct cache_entry *)item->udata; return get_uri_string(cached->uri, URI_PUBLIC); } @@ -56,7 +56,7 @@ get_cache_entry_text(struct listbox_item *item, struct terminal *term) static char * get_cache_entry_info(struct listbox_item *item, struct terminal *term) { - struct cache_entry *cached = item->udata; + struct cache_entry *cached = (struct cache_entry *)item->udata; struct string msg; if (item->type == BI_FOLDER) return NULL; @@ -160,7 +160,7 @@ get_cache_entry_info(struct listbox_item *item, struct terminal *term) static struct uri * get_cache_entry_uri(struct listbox_item *item) { - struct cache_entry *cached = item->udata; + struct cache_entry *cached = (struct cache_entry *)item->udata; return get_uri_reference(cached->uri); } @@ -180,7 +180,7 @@ can_delete_cache_entry(struct listbox_item *item) static void delete_cache_entry_item(struct listbox_item *item, int last) { - struct cache_entry *cached = item->udata; + struct cache_entry *cached = (struct cache_entry *)item->udata; assert(!is_object_used(cached)); @@ -191,7 +191,7 @@ static enum listbox_match match_cache_entry(struct listbox_item *item, struct terminal *term, char *text) { - struct cache_entry *cached = item->udata; + struct cache_entry *cached = (struct cache_entry *)item->udata; if (c_strcasestr((const char *)struri(cached->uri), (const char *)text) || (cached->head && c_strcasestr((const char *)cached->head, (const char *)text))) @@ -204,7 +204,7 @@ static enum listbox_match match_cache_entry_contents(struct listbox_item *item, struct terminal *term, char *text) { - struct cache_entry *cached = item->udata; + struct cache_entry *cached = (struct cache_entry *)item->udata; struct fragment *fragment = get_cache_fragment(cached); if (fragment && strlcasestr(fragment->data, fragment->length, text, -1)) @@ -297,7 +297,7 @@ push_invalidate_button(struct dialog_data *dlg_data, struct widget_data *button) { struct terminal *term = dlg_data->win->term; struct listbox_data *box = get_dlg_listbox_data(dlg_data); - struct cache_entry *cached = box->sel->udata; + struct cache_entry *cached = (struct cache_entry *)box->sel->udata; if (!box->sel || !box->sel->udata) return EVENT_PROCESSED;