* [PATCH]script:conf.c Fix warning: variable 'type' set but not used
@ 2010-06-11 5:23 Justin P. Mattock
2010-06-11 6:30 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Justin P. Mattock @ 2010-06-11 5:23 UTC (permalink / raw)
To: linux-kernel; +Cc: andi, Justin P. Mattock
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.
(not sure with earlier version of gcc).
please have a look and let me know.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
scripts/kconfig/conf.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 9960d1c..d6369e8 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -156,14 +156,12 @@ static int conf_string(struct menu *menu)
static int conf_sym(struct menu *menu)
{
struct symbol *sym = menu->sym;
- int type;
tristate oldval, newval;
while (1) {
printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
if (sym->name)
printf("(%s) ", sym->name);
- type = sym_get_type(sym);
putchar('[');
oldval = sym_get_tristate_value(sym);
switch (oldval) {
@@ -228,11 +226,9 @@ static int conf_choice(struct menu *menu)
{
struct symbol *sym, *def_sym;
struct menu *child;
- int type;
bool is_new;
sym = menu->sym;
- type = sym_get_type(sym);
is_new = !sym_has_value(sym);
if (sym_is_changable(sym)) {
conf_sym(menu);
--
1.7.1.rc1.21.gf3bd6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH]script:conf.c Fix warning: variable 'type' set but not used
2010-06-11 5:23 [PATCH]script:conf.c Fix warning: variable 'type' set but not used Justin P. Mattock
@ 2010-06-11 6:30 ` Andi Kleen
2010-06-11 6:36 ` Justin P. Mattock
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2010-06-11 6:30 UTC (permalink / raw)
To: Justin P. Mattock; +Cc: linux-kernel, andi
> I get this using gcc 4.6.0 the below change fixes this form me.
> (not sure with earlier version of gcc).
> please have a look and let me know.
>From a quick look it's likely correct, but you really need
to send this to the Kconfig maintainer, not to me.
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]script:conf.c Fix warning: variable 'type' set but not used
2010-06-11 6:30 ` Andi Kleen
@ 2010-06-11 6:36 ` Justin P. Mattock
0 siblings, 0 replies; 3+ messages in thread
From: Justin P. Mattock @ 2010-06-11 6:36 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
On 06/10/2010 11:30 PM, Andi Kleen wrote:
>> I get this using gcc 4.6.0 the below change fixes this form me.
>> (not sure with earlier version of gcc).
>> please have a look and let me know.
>
>> From a quick look it's likely correct, but you really need
> to send this to the Kconfig maintainer, not to me.
>
> -Andi
>
alright.. I've another one
(hopefully right), so I'll just
go through the list of warnings
then with what I get out of i'll
compose a list of cc's/patches to the
appropriate person.
Justin P. Mattock
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-11 6:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 5:23 [PATCH]script:conf.c Fix warning: variable 'type' set but not used Justin P. Mattock
2010-06-11 6:30 ` Andi Kleen
2010-06-11 6:36 ` Justin P. Mattock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox