-Wshadow: Fix warnings in mconf
RFC PATCH 2/9 -Wshadow: Fix warnings in mconf
(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.
---
scripts/kconfig/mconf.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/kconfig/mconf.c +3 -3
@@ -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 *filenacprint ("%s" , title); }cprint ("--textbox" ); -cprint ("%s" , filename); +cprint ("%s" , fname);cprint ("%d" , r ? r : rows);cprint ("%d" , c ? c : cols); }while (exec_conf () <0 );
hoi :)
scripts/kconfig/mconf.c static void conf_save(void); · line 282
Quoted 11 lines · Jesper Juhl
scripts/kconfig/mconf.c +1
-1@@ -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?
Signature · 1 line
Martin Waitz
Quoted 10 lines · Martin Waitz
Quoted 9 lines · Jesper Juhl
scripts/kconfig/mconf.c +1
-1@@ -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);
Quoted 5 lines
scripts/kconfig/mconf.c static void conf_save(void); · line 282
Quoted 2 lines
scripts/kconfig/mconf.c +0
-0static 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
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +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));
Quoted 12 lines · Martin Waitz
hoi :)
Quoted 9 lines · Jesper Juhl
scripts/kconfig/mconf.c 2006-07-09 19:48:05.000000000 +0200 renamed from scripts/kconfig/mconf.c 2006-06-18 03:49:35.000000000 +0200 +1
-1@@ -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);
Quoted 6 lines
scripts/kconfig/mconf.c 2006-07-09 19:48:05.000000000 +0200 static void conf_save(void); · line 282
Quoted 2 lines
scripts/kconfig/mconf.c 2006-07-09 19:48:05.000000000 +0200 renamed from scripts/kconfig/mconf.c 2006-06-18 03:49:35.000000000 +0200 +0
-0static 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.
Signature · 3 lines
Jesper Juhl <[email protected]> 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