diff --git a/src/document/document.c b/src/document/document.c index 6099b07d..2a616b59 100644 --- a/src/document/document.c +++ b/src/document/document.c @@ -282,7 +282,7 @@ reset_document(struct document *document) /// done_document_options(&document->options); while (!list_empty(document->forms)) { - done_form(document->forms.next); + done_form((struct form *)document->forms.next); } #ifdef CONFIG_CSS @@ -352,7 +352,7 @@ done_document(struct document *document) done_document_options(&document->options); while (!list_empty(document->forms)) { - done_form(document->forms.next); + done_form((struct form *)document->forms.next); } #ifdef CONFIG_CSS diff --git a/src/document/html/parser.c b/src/document/html/parser.c index ce696b7b..e89454c6 100644 --- a/src/document/html/parser.c +++ b/src/document/html/parser.c @@ -205,7 +205,7 @@ void import_css_stylesheet(struct css_stylesheet *css, struct uri *base_uri, const char *unterminated_url, int len) { - struct html_context *html_context = css->import_data; + struct html_context *html_context = (struct html_context *)css->import_data; char *url; char *import_url; struct uri *uri; @@ -602,7 +602,7 @@ look_for_link(char **pos, char *eof, struct menu_item **menu, ld->target = target; for (nmenu = 0; !mi_is_end_of_menu(&(*menu)[nmenu]); nmenu++) { - struct link_def *ll = (*menu)[nmenu].data; + struct link_def *ll = (struct link_def *)(*menu)[nmenu].data; if (!strcmp(ll->link, ld->link) && !strcmp(ll->target, ld->target)) { @@ -727,7 +727,7 @@ void done_html_parser_state(struct html_context *html_context, void *state) { - struct html_element *element = state; + struct html_element *element = (struct html_element *)state; html_context->line_breax = 1; @@ -859,7 +859,7 @@ done_html_parser(struct html_context *html_context) mem_free(html_context->base_target); done_uri(html_context->base_href); - kill_html_stack_item(html_context, html_context->stack.next); + kill_html_stack_item(html_context, (struct html_element *)html_context->stack.next); assertm(list_empty(html_context->stack), "html stack not empty after operation"); diff --git a/src/document/html/parser/forms.c b/src/document/html/parser/forms.c index e8e99385..43f0c234 100644 --- a/src/document/html/parser/forms.c +++ b/src/document/html/parser/forms.c @@ -339,7 +339,7 @@ do_html_select(char *attr, char *html, char *eof, char **end, struct html_context *html_context) { - struct conv_table *ct = html_context->special_f(html_context, SP_TABLE, NULL); + struct conv_table *ct = (struct conv_table *)html_context->special_f(html_context, SP_TABLE, NULL); struct el_form_control *fc; struct string lbl = NULL_STRING, orig_lbl = NULL_STRING; char **values = NULL; diff --git a/src/document/html/parser/general.c b/src/document/html/parser/general.c index ebf6aa1d..6d6594a6 100644 --- a/src/document/html/parser/general.c +++ b/src/document/html/parser/general.c @@ -1119,7 +1119,7 @@ html_frameset(struct html_context *html_context, char *a, fp.parent = html_top->frameset; if (fp.x && fp.y) { - html_top->frameset = html_context->special_f(html_context, SP_FRAMESET, &fp); + html_top->frameset = (struct frameset_desc *)html_context->special_f(html_context, SP_FRAMESET, &fp); } mem_free_if(fp.width); mem_free_if(fp.height); diff --git a/src/document/html/parser/stack.c b/src/document/html/parser/stack.c index 3003ab67..bf7fce67 100644 --- a/src/document/html/parser/stack.c +++ b/src/document/html/parser/stack.c @@ -149,7 +149,7 @@ void html_stack_dup(struct html_context *html_context, enum html_element_mortality_type type) { struct html_element *e; - struct html_element *ep = html_context->stack.next; + struct html_element *ep = (struct html_element *)html_context->stack.next; assertm(ep && (void *) ep != &html_context->stack, "html stack empty"); if_assert_failed return; diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 62f94122..182223ab 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -1511,7 +1511,7 @@ new_link(struct html_context *html_context, char *name, int namelen) * though, so we can safely just take that. */ form = fc->form; if (!form && !list_empty(document->forms)) - form = document->forms.next; + form = (struct form *)document->forms.next; link->target = null_or_stracpy(form ? form->target : NULL); } @@ -2100,7 +2100,7 @@ html_special_form_control(struct part *part, struct el_form_control *fc) add_to_list(part->document->forms, form); } /* Attach this form control to the last form encountered. */ - form = part->document->forms.next; + form = (struct form *)part->document->forms.next; fc->form = form; add_to_list(form->items, fc); } @@ -2495,7 +2495,7 @@ format_html_part(struct html_context *html_context, #endif if (document) { - struct node *node = document->nodes.next; + struct node *node = (struct node *)document->nodes.next; node->box.height = y - node->box.y + part->box.height; } diff --git a/src/document/html/tables.c b/src/document/html/tables.c index d5a7db99..85a2ef04 100644 --- a/src/document/html/tables.c +++ b/src/document/html/tables.c @@ -867,7 +867,7 @@ draw_table_cell(struct table *table, int col, int row, int x, int y, #endif } - state = init_html_parser_state(html_context, ELEMENT_DONT_KILL, + state = (struct html_element *)init_html_parser_state(html_context, ELEMENT_DONT_KILL, cell->align, 0, 0); if (cell->is_header) elformat.style.attr |= AT_BOLD; @@ -1301,7 +1301,7 @@ format_table(char *attr, char *html, char *eof, * Otherwise i.e.
tags between and are broken. */ draw_table_bad_html(html_context, table); - state = init_html_parser_state(html_context, ELEMENT_DONT_KILL, + state = (struct html_element *)init_html_parser_state(html_context, ELEMENT_DONT_KILL, ALIGN_LEFT, 0, 0); margins = /*par_elformat.blockquote_level + */par_elformat.leftmargin + par_elformat.rightmargin; @@ -1331,7 +1331,7 @@ format_table(char *attr, char *html, char *eof, goto ret2; } - node = part->document->nodes.next; + node = (struct node *)part->document->nodes.next; node->box.height = part->box.y - node->box.y + part->cy; indent = get_table_indent(html_context, table); diff --git a/src/document/plain/renderer.c b/src/document/plain/renderer.c index ad7f2c86..89086d31 100644 --- a/src/document/plain/renderer.c +++ b/src/document/plain/renderer.c @@ -115,7 +115,7 @@ check_link_word(struct document *document, char *uri, int length, { struct uri test; char *where = NULL; - char *mailto = memchr(uri, '@', length); + char *mailto = (char *)memchr(uri, '@', length); int keep = uri[length]; struct link *new_link; diff --git a/src/document/refresh.c b/src/document/refresh.c index a323121e..1fcd01ab 100644 --- a/src/document/refresh.c +++ b/src/document/refresh.c @@ -67,7 +67,7 @@ done_document_refresh(struct document_refresh *refresh) static void do_document_refresh(void *data) { - struct document_view *doc_view = data; + struct document_view *doc_view = (struct document_view *)data; struct document_refresh *refresh = doc_view->document->refresh; struct type_query *type_query; diff --git a/src/document/renderer.c b/src/document/renderer.c index a6e3dc84..8c0f53a2 100644 --- a/src/document/renderer.c +++ b/src/document/renderer.c @@ -553,7 +553,7 @@ render_document_frames(struct session *ses, int no_cache) static int comp_links(const void *v1, const void *v2) { - const struct link *l1 = v1, *l2 = v2; + const struct link *l1 = (const struct link *)v1, *l2 = (const struct link *)v2; assert(l1 && l2); if_assert_failed return 0;