public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 2/9] -Wshadow: Fix warnings in mconf
@ 2006-07-10 11:12 Jesper Juhl
  2006-07-10 15:53 ` Martin Waitz
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2006-07-10 11:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: jesper.juhl

(please see the mail titled 
 "[RFC][PATCH 0/9] -Wshadow: Making the kernel build clean with -Wshadow"
 for an explanation of why I'm doing this)


Fix the following -Wshadow warnings in mconf : 

  scripts/kconfig/mconf.c:279: warning: declaration of 'filename' shadows a global declaration
  scripts/kconfig/mconf.c:261: warning: shadowed declaration is here
  scripts/kconfig/mconf.c:867: warning: declaration of 'filename' shadows a global declaration
  scripts/kconfig/mconf.c:261: warning: shadowed declaration is here

This makes  make all[no|mod|yes]config -Wshadow clean.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 scripts/kconfig/mconf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.18-rc1-orig/scripts/kconfig/mconf.c	2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6.18-rc1/scripts/kconfig/mconf.c	2006-07-09 19:48:05.000000000 +0200
@@ -276,7 +276,7 @@ static void conf_save(void);
 static void show_textbox(const char *title, const char *text, int r, int c);
 static void show_helptext(const char *title, const char *text);
 static void show_help(struct menu *menu);
-static void show_file(const char *filename, const char *title, int r, int c);
+static void show_file(const char *fname, const char *title, int r, int c);
 
 static void cprint_init(void);
 static int cprint1(const char *fmt, ...);
@@ -864,7 +864,7 @@ static void show_help(struct menu *menu)
 	str_free(&help);
 }
 
-static void show_file(const char *filename, const char *title, int r, int c)
+static void show_file(const char *fname, const char *title, int r, int c)
 {
 	do {
 		cprint_init();
@@ -873,7 +873,7 @@ static void show_file(const char *filena
 			cprint("%s", title);
 		}
 		cprint("--textbox");
-		cprint("%s", filename);
+		cprint("%s", fname);
 		cprint("%d", r ? r : rows);
 		cprint("%d", c ? c : cols);
 	} while (exec_conf() < 0);




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

* Re: [RFC][PATCH 2/9] -Wshadow: Fix warnings in mconf
  2006-07-10 11:12 [RFC][PATCH 2/9] -Wshadow: Fix warnings in mconf Jesper Juhl
@ 2006-07-10 15:53 ` Martin Waitz
  2006-07-10 16:18   ` Jan-Benedict Glaw
  2006-07-10 22:16   ` Jesper Juhl
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Waitz @ 2006-07-10 15:53 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

hoi :)

On Mon, Jul 10, 2006 at 01:12:37PM +0200, Jesper Juhl wrote:
> --- linux-2.6.18-rc1-orig/scripts/kconfig/mconf.c	2006-06-18 03:49:35.000000000 +0200
> +++ linux-2.6.18-rc1/scripts/kconfig/mconf.c	2006-07-09 19:48:05.000000000 +0200
> @@ -276,7 +276,7 @@ static void conf_save(void);
>  static void show_textbox(const char *title, const char *text, int r, int c);
>  static void show_helptext(const char *title, const char *text);
>  static void show_help(struct menu *menu);
> -static void show_file(const char *filename, const char *title, int r, int c);
> +static void show_file(const char *fname, const char *title, int r, int c);
>  
>  static void cprint_init(void);
>  static int cprint1(const char *fmt, ...);

perhaps its more clear if you change the global variable instead?
perhaps to config_filename?

-- 
Martin Waitz

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [RFC][PATCH 2/9] -Wshadow: Fix warnings in mconf
  2006-07-10 15:53 ` Martin Waitz
@ 2006-07-10 16:18   ` Jan-Benedict Glaw
  2006-07-10 22:16   ` Jesper Juhl
  1 sibling, 0 replies; 4+ messages in thread
From: Jan-Benedict Glaw @ 2006-07-10 16:18 UTC (permalink / raw)
  To: Jesper Juhl, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

On Mon, 2006-07-10 17:53:37 +0200, Martin Waitz <tali@admingilde.org> wrote:
> On Mon, Jul 10, 2006 at 01:12:37PM +0200, Jesper Juhl wrote:
> > --- linux-2.6.18-rc1-orig/scripts/kconfig/mconf.c	2006-06-18 03:49:35.000000000 +0200
> > +++ linux-2.6.18-rc1/scripts/kconfig/mconf.c	2006-07-09 19:48:05.000000000 +0200
> > @@ -276,7 +276,7 @@ static void conf_save(void);
> >  static void show_textbox(const char *title, const char *text, int r, int c);
> >  static void show_helptext(const char *title, const char *text);
> >  static void show_help(struct menu *menu);
> > -static void show_file(const char *filename, const char *title, int r, int c);
> > +static void show_file(const char *fname, const char *title, int r, int c);
> >  
> >  static void cprint_init(void);
> >  static int cprint1(const char *fmt, ...);
> 
> perhaps its more clear if you change the global variable instead?
> perhaps to config_filename?

After all, that's just a declaration. I doubt that GCC should warn
here at all...

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [RFC][PATCH 2/9] -Wshadow: Fix warnings in mconf
  2006-07-10 15:53 ` Martin Waitz
  2006-07-10 16:18   ` Jan-Benedict Glaw
@ 2006-07-10 22:16   ` Jesper Juhl
  1 sibling, 0 replies; 4+ messages in thread
From: Jesper Juhl @ 2006-07-10 22:16 UTC (permalink / raw)
  To: Jesper Juhl, linux-kernel

On 10/07/06, Martin Waitz <tali@admingilde.org> wrote:
> hoi :)
>
> On Mon, Jul 10, 2006 at 01:12:37PM +0200, Jesper Juhl wrote:
> > --- linux-2.6.18-rc1-orig/scripts/kconfig/mconf.c     2006-06-18 03:49:35.000000000 +0200
> > +++ linux-2.6.18-rc1/scripts/kconfig/mconf.c  2006-07-09 19:48:05.000000000 +0200
> > @@ -276,7 +276,7 @@ static void conf_save(void);
> >  static void show_textbox(const char *title, const char *text, int r, int c);
> >  static void show_helptext(const char *title, const char *text);
> >  static void show_help(struct menu *menu);
> > -static void show_file(const char *filename, const char *title, int r, int c);
> > +static void show_file(const char *fname, const char *title, int r, int c);
> >
> >  static void cprint_init(void);
> >  static int cprint1(const char *fmt, ...);
>
> perhaps its more clear if you change the global variable instead?
> perhaps to config_filename?
>

Not a bad suggestion. Thanks.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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

end of thread, other threads:[~2006-07-10 22:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10 11:12 [RFC][PATCH 2/9] -Wshadow: Fix warnings in mconf Jesper Juhl
2006-07-10 15:53 ` Martin Waitz
2006-07-10 16:18   ` Jan-Benedict Glaw
2006-07-10 22:16   ` Jesper Juhl

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