public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix set but not used warnings
@ 2011-10-22 18:01 Peter Foley
  2011-10-22 19:30 ` Arnaud Lacombe
  2011-12-11 20:30 ` Michal Marek
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Foley @ 2011-10-22 18:01 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux Kbuild Mailing List, mmarek

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>
---
 scripts/kconfig/gconf.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index b9e26a5..adc2306 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -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;
@@ -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);
@@ -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)
@@ -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:
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: fix set but not used warnings
  2011-10-22 18:01 [PATCH] kbuild: fix set but not used warnings Peter Foley
@ 2011-10-22 19:30 ` Arnaud Lacombe
  2011-10-22 19:40   ` Peter Foley
  2011-12-11 20:30 ` Michal Marek
  1 sibling, 1 reply; 4+ messages in thread
From: Arnaud Lacombe @ 2011-10-22 19:30 UTC (permalink / raw)
  To: Peter Foley; +Cc: Linux Kernel Mailing List, Linux Kbuild Mailing List, mmarek

Hi,

On Sat, Oct 22, 2011 at 2:01 PM, Peter Foley <pefoley2@verizon.net> wrote:
> 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>
>
s/kbuild/kconfig/ in the subject, that help to know changes is only
limited to scripts/kconfig/

 - Arnaud

> ---
>  scripts/kconfig/gconf.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
> index b9e26a5..adc2306 100644
> --- a/scripts/kconfig/gconf.c
> +++ b/scripts/kconfig/gconf.c
> @@ -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;
> @@ -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);
> @@ -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)
> @@ -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:
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: fix set but not used warnings
  2011-10-22 19:30 ` Arnaud Lacombe
@ 2011-10-22 19:40   ` Peter Foley
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Foley @ 2011-10-22 19:40 UTC (permalink / raw)
  To: Arnaud Lacombe
  Cc: Peter Foley, Linux Kernel Mailing List, Linux Kbuild Mailing List,
	mmarek

[-- Attachment #1: Type: TEXT/PLAIN, Size: 830 bytes --]

On Sat, 22 Oct 2011, Arnaud Lacombe wrote:

> Hi,
> 
> On Sat, Oct 22, 2011 at 2:01 PM, Peter Foley <pefoley2@verizon.net> wrote:
> > 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>
> >
> s/kbuild/kconfig/ in the subject, that help to know changes is only
> limited to scripts/kconfig/
> 
>  - Arnaud

Noted. Should I resend this patch? 

Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: fix set but not used warnings
  2011-10-22 18:01 [PATCH] kbuild: fix set but not used warnings Peter Foley
  2011-10-22 19:30 ` Arnaud Lacombe
@ 2011-12-11 20:30 ` Michal Marek
  1 sibling, 0 replies; 4+ messages in thread
From: Michal Marek @ 2011-12-11 20:30 UTC (permalink / raw)
  To: Peter Foley; +Cc: Linux Kernel Mailing List, Linux Kbuild Mailing List

On Sat, Oct 22, 2011 at 02:01:24PM -0400, Peter Foley wrote:
> 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>
> ---
>  scripts/kconfig/gconf.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)

Applied to kbuild.git#kconfig.

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-11 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-22 18:01 [PATCH] kbuild: fix set but not used warnings Peter Foley
2011-10-22 19:30 ` Arnaud Lacombe
2011-10-22 19:40   ` Peter Foley
2011-12-11 20:30 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox