Skip to content

Commit

Permalink
kconfig: fix set but not used warnings
Browse files Browse the repository at this point in the history
Remove set but not used variables to fix warnings.

  HOSTCC  scripts/kconfig/gconf.o
/usr/src/lto/scripts/kconfig/gconf.c: In function 'change_sym_value':
/usr/src/lto/scripts/kconfig/gconf.c:833:11: warning: variable 'oldval' set but not used [-Wunused-but-set-variable]
/usr/src/lto/scripts/kconfig/gconf.c: In function 'update_tree':
/usr/src/lto/scripts/kconfig/gconf.c:1281:19: warning: variable 'prop' set but not used [-Wunused-but-set-variable]

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
pefoley2 authored and michal42 committed Dec 11, 2011
1 parent a7d6f6e commit 4f0c28f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/kconfig/gconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ static void renderer_edited(GtkCellRendererText * cell,
static void change_sym_value(struct menu *menu, gint col)
{
struct symbol *sym = menu->sym;
tristate oldval, newval;
tristate newval;

if (!sym)
return;
Expand All @@ -847,7 +847,6 @@ static void change_sym_value(struct menu *menu, gint col)
switch (sym_get_type(sym)) {
case S_BOOLEAN:
case S_TRISTATE:
oldval = sym_get_tristate_value(sym);
if (!sym_tristate_within_range(sym, newval))
newval = yes;
sym_set_tristate_value(sym, newval);
Expand Down Expand Up @@ -1278,7 +1277,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
gboolean valid;
GtkTreeIter *sibling;
struct symbol *sym;
struct property *prop;
struct menu *menu1, *menu2;

if (src == &rootmenu)
Expand All @@ -1287,7 +1285,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
valid = gtk_tree_model_iter_children(model2, child2, dst);
for (child1 = src->list; child1; child1 = child1->next) {

prop = child1->prompt;
sym = child1->sym;

reparse:
Expand Down

0 comments on commit 4f0c28f

Please sign in to comment.