scripts:conf.c Fix warning: variable 'type' set but not used

Not sure if this is correct or not, but with
make menuconfig
  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function 'conf_sym':
scripts/kconfig/conf.c:159:6: warning: variable 'type' set but not used
scripts/kconfig/conf.c: In function 'conf_choice':
scripts/kconfig/conf.c:231:6: warning: variable 'type' set but not used
  HOSTLD  scripts/kconfig/mconf

I get this using gcc 4.6.0 the below change fixes this form me.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Justin P. Mattock 2010-06-11 13:41:04 -07:00 коммит произвёл Michal Marek
Родитель e7401d8321
Коммит 60c8eca69f
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -163,14 +163,12 @@ static int conf_string(struct menu *menu)
static int conf_sym(struct menu *menu) static int conf_sym(struct menu *menu)
{ {
struct symbol *sym = menu->sym; struct symbol *sym = menu->sym;
int type;
tristate oldval, newval; tristate oldval, newval;
while (1) { while (1) {
printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
if (sym->name) if (sym->name)
printf("(%s) ", sym->name); printf("(%s) ", sym->name);
type = sym_get_type(sym);
putchar('['); putchar('[');
oldval = sym_get_tristate_value(sym); oldval = sym_get_tristate_value(sym);
switch (oldval) { switch (oldval) {
@ -235,11 +233,9 @@ static int conf_choice(struct menu *menu)
{ {
struct symbol *sym, *def_sym; struct symbol *sym, *def_sym;
struct menu *child; struct menu *child;
int type;
bool is_new; bool is_new;
sym = menu->sym; sym = menu->sym;
type = sym_get_type(sym);
is_new = !sym_has_value(sym); is_new = !sym_has_value(sym);
if (sym_is_changable(sym)) { if (sym_is_changable(sym)) {
conf_sym(menu); conf_sym(menu);