On Saturday 30 April 2011 18:34, Cristian Ionescu-Idbohrn wrote:
> dist: debian unstable (aka sid)
> gcc-4.6.real (Debian 4.6.0-6) 4.6.1 20110428 (prerelease)
> BusyBox v1.19.0.git (2011-04-30 18:22:26 CEST) multi-call binary.
> 
> I'd like to understand what's going on, why, and what I can do about it:
> 
>   HOSTCC  scripts/kconfig/conf.o
> scripts/kconfig/conf.c: In function 'conf_string':
> scripts/kconfig/conf.c:176:20: warning: variable 'help' set but not used
> [-Wunused-but-set-variable]

int conf_string(struct menu *menu)
{
        struct symbol *sym = menu->sym;
        const char *def, *help;

        while (1) {
                printf("%*s%s ", indent - 1, "", menu->prompt->text);
                printf("(%s) ", sym->name);
                def = sym_get_string_value(sym);
                if (sym_get_string_value(sym))
                        printf("[%s] ", def);
                conf_askvalue(sym, def);
                switch (line[0]) {
                case '\n':
                        break;
                case '?':
                        /* 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;
                        }
                default:
                        line[strlen(line)-1] = 0;
                        def = line;
                }
                if (def && sym_set_string_value(sym, def))
                        return 0;
        }
}

Above, variable "help" is not used and can be deleted.
You can send a patch which fixes it.

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to