all these warnings...
Denys Vlasenko
vda.linux at googlemail.com
Wed May 4 23:40:57 UTC 2011
On Monday 02 May 2011 09:47, Bernhard Reutner-Fischer wrote:
> On Sat, Apr 30, 2011 at 10:49:52PM +0200, Harald Becker wrote:
> > Hallo Denys!
> >
> >> /* print help */
> >> if (line[1] == '\n') {
> >> help = nohelp_text;
> >> if (menu->sym->help)
> >> help = menu->sym->help;
> >> printf("\n%s\n", menu->sym->help);
> >> def = NULL;
> >> break;
> >> Above, variable "help" is not used and can be deleted.
> >
> >Shouldn't this be ... ?
> >
> >printf( "\n%s\n", help );
> >
> >or may be better ... ?
> >
> >printf("\n%s\n", menu->sym->help ? menu->sym->help : nohelp_text );
>
> What i always found inconvenient is the handling of helptext for e.g. choices;
>
> --- config.OLD/mconf.c 2008-10-17 19:38:37.000000000 +0200
> +++ config/mconf.c 2008-10-27 15:08:57.000000000 +0100
> @@ -704,9 +704,12 @@
> {
> if (sym->name) {
> str_printf(&help, "%s:\n\n", sym->name);
> - str_append(&help, _(menu_get_help(menu)));
> - str_append(&help, "\n");
> }
> + str_append(&help, _(menu_get_help(menu)));
> + str_append(&help, "\n");
> + } else if (menu_has_help(sym->prop->menu->parent)) {
> + str_append(&help, _(menu_get_help(sym->prop->menu->parent)));
> + str_append(&help, "\n");
> } else {
> str_append(&help, nohelp_text);
> }
>
> just fyi..
config/mconf.c came from kernel tree. I don't plan to maintain a fork,
I plan to migrate to updated version from newer kernels.
--
vda
More information about the busybox
mailing list