diff --git a/src/globhist/dialogs.c b/src/globhist/dialogs.c index 7f7571d20..f0d1dcf29 100644 --- a/src/globhist/dialogs.c +++ b/src/globhist/dialogs.c @@ -44,7 +44,7 @@ is_globhist_item_used(struct listbox_item *item) static char * get_globhist_item_text(struct listbox_item *box_item, struct terminal *term) { - struct global_history_item *item = box_item->udata; + struct global_history_item *item = (struct global_history_item *)box_item->udata; struct string info; if (get_opt_int("document.history.global.display_type", NULL) @@ -59,7 +59,7 @@ get_globhist_item_text(struct listbox_item *box_item, struct terminal *term) static char * get_globhist_item_info(struct listbox_item *box_item, struct terminal *term) { - struct global_history_item *item = box_item->udata; + struct global_history_item *item = (struct global_history_item *)box_item->udata; struct string info; if (box_item->type == BI_FOLDER) return NULL; @@ -82,7 +82,7 @@ get_globhist_item_root(struct listbox_item *box_item) static struct uri * get_globhist_item_uri(struct listbox_item *item) { - struct global_history_item *historyitem = item->udata; + struct global_history_item *historyitem = (struct global_history_item *)item->udata; return get_uri(historyitem->url, URI_NONE); } @@ -96,7 +96,7 @@ can_delete_globhist_item(struct listbox_item *item) static void delete_globhist_item(struct listbox_item *item, int last) { - struct global_history_item *historyitem = item->udata; + struct global_history_item *historyitem = (struct global_history_item *)item->udata; assert(!is_object_used(historyitem)); @@ -150,11 +150,11 @@ static const struct listbox_ops gh_listbox_ops = { static void history_search_do(void *data) { - struct dialog *dlg = data; - struct listbox_item *item = globhist_browser.root.child.next; + struct dialog *dlg = (struct dialog *)data; + struct listbox_item *item = (struct listbox_item *)globhist_browser.root.child.next; struct listbox_data *box; - if (!globhist_simple_search(dlg->widgets[1].data, dlg->widgets[0].data)) return; + if (!globhist_simple_search((char *)dlg->widgets[1].data, (char *)dlg->widgets[0].data)) return; if (list_empty(globhist_browser.root.child)) return; /* Shouldn't we rather do this only for the specific listbox_data box @@ -211,7 +211,7 @@ push_bookmark_button(struct dialog_data *dlg_data, if (!box->sel) return EVENT_PROCESSED; - historyitem = box->sel->udata; + historyitem = (struct global_history_item *)box->sel->udata; if (!historyitem) return EVENT_PROCESSED; launch_bm_add_dialog(term, NULL, NULL, diff --git a/src/globhist/globhist.c b/src/globhist/globhist.c index 7be7db4e8..b2849f940 100644 --- a/src/globhist/globhist.c +++ b/src/globhist/globhist.c @@ -225,7 +225,7 @@ cap_global_history(int max_globhist_items) while (global_history.size >= max_globhist_items) { struct global_history_item *history_item; - history_item = global_history.entries.prev; + history_item = (struct global_history_item *)global_history.entries.prev; if ((void *) history_item == &global_history.entries) { INTERNAL("global history is empty"); @@ -410,7 +410,7 @@ free_global_history(void) } while (!list_empty(global_history.entries)) - delete_global_history_item(global_history.entries.next); + delete_global_history_item((struct global_history_item *)global_history.entries.next); reap_deleted_globhist_items(); }