1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-03 03:56:32 -04:00

Cast variadic arguments of add_to_ml to void *.

getml reads the args with va_arg(ap, void *), and the NULL macro in
particular may have the wrong type.
This commit is contained in:
Kalle Olavi Niemitalo 2007-03-11 12:44:13 +02:00 committed by Witold Filipczyk
parent b35505c813
commit 33b8f7175e
3 changed files with 6 additions and 5 deletions

View File

@ -238,7 +238,7 @@ input_field(struct terminal *term, struct memory_list *ml, int intl,
add_dlg_end(dlg, INPUT_WIDGETS_COUNT);
add_to_ml(&ml, dlg, NULL);
add_to_ml(&ml, (void *) dlg, (void *) NULL);
do_dialog(term, dlg, ml);
}

View File

@ -561,7 +561,7 @@ look_for_link(unsigned char **pos, unsigned char *eof, struct menu_item **menu,
} else if (!strlcasecmp(name, namelen, "/MAP", 4)) {
/* This is the only successful return from here! */
add_to_ml(ml, *menu, NULL);
add_to_ml(ml, (void *) *menu, (void *) NULL);
return 0;
} else {
@ -644,7 +644,8 @@ look_for_link(unsigned char **pos, unsigned char *eof, struct menu_item **menu,
nm[nmenu].flags = NO_INTL;
}
add_to_ml(ml, ld, ld->link, ld->target, label, NULL);
add_to_ml(ml, (void *) ld, (void *) ld->link, (void *) ld->target,
(void *) label, (void *) NULL);
return 1;
}

View File

@ -1654,7 +1654,7 @@ search_dlg_do(struct terminal *term, struct memory_list *ml,
dlg->udata = text;
dlg->udata2 = hop;
add_to_ml(&ml, hop, NULL);
add_to_ml(&ml, (void *) hop, (void *) NULL);
/* @field is automatically cleared by calloc() */
field = get_dialog_offset(dlg, SEARCH_WIDGETS_COUNT);
@ -1671,7 +1671,7 @@ search_dlg_do(struct terminal *term, struct memory_list *ml,
add_dlg_end(dlg, SEARCH_WIDGETS_COUNT);
add_to_ml(&ml, dlg, NULL);
add_to_ml(&ml, (void *) dlg, (void *) NULL);
do_dialog(term, dlg, ml);
}