mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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:
parent
a05f7203cd
commit
22af2b22e2
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user