scripts/kconfig/nconf.gui.c Fix warning: value computed is not used
PATCH 1/1 scripts/kconfig/nconf.gui.c Fix warning: value computed is not used
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCC scripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not used scripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not used scripts/kconfig/nconf.gui.c:304:2: warning: value computed is not used scripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not used scripts/kconfig/nconf.gui.c:397:2: warning: value computed is not used scripts/kconfig/nconf.gui.c:399:2: warning: value computed is not used scripts/kconfig/nconf.gui.c:404:2: warning: value computed is not used scripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not used scripts/kconfig/nconf.gui.c:549:2: warning: value computed is not used scripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used
HOSTLD scripts/kconfig/nconfscripts/kconfig/nconf arch/x86/Kconfig
I looked around for a way to fix these, but am not familiar with ncurses. if there's a better way let me know and/or send a seperate fix.
--- scripts/kconfig/nconf.gui.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-)
scripts/kconfig/nconf.gui.c +0 -11
@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length =strlen (string); temp = (width - length) /2 ; x = startx + (int )temp; -wattrset (win, color);mvwprintw (win, y, x,"%s" , string);refresh (); }
@@ -297,11 +296,9 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)set_menu_fore (menu, attributes[DIALOG_MENU_FORE ]);set_menu_back (menu, attributes[DIALOG_MENU_BACK ]); -wattrset (win, attributes[DIALOG_BOX ]);box (win,0 ,0 );/* print message */ -wattrset (msg_win, attributes[DIALOG_TEXT ]);fill_window (msg_win, msg);set_menu_win (menu, win);
@@ -392,16 +389,11 @@ int dialog_inputbox(WINDOW *main_window, form_win =derwin (win,1 , prompt_width, prompt_lines+3 ,2 );keypad (form_win, TRUE); -wattrset (form_win, attributes[INPUT_FIELD ]); - -wattrset (win, attributes[INPUT_BOX ]);box (win,0 ,0 ); -wattrset (win, attributes[INPUT_HEADING ]);if (title)mvwprintw (win,0 ,3 ,"%s" , title);/* print message */ -wattrset (prompt_win, attributes[INPUT_TEXT ]);fill_window (prompt_win, prompt);mvwprintw (form_win,0 ,0 ,"%*s" , prompt_width," " );
@@ -531,7 +523,6 @@ void show_scroll_win(WINDOW *main_window,/* create the pad */ pad =newpad (total_lines+10 , total_cols+10 ); -wattrset (pad, attributes[SCROLLWIN_TEXT ]);fill_window (pad, text); win_lines =min (total_lines+4 ,LINES -2 );
@@ -546,9 +537,7 @@ void show_scroll_win(WINDOW *main_window, win =newwin (win_lines, win_cols, y, x);keypad (win, TRUE);/* show the help in the help window, and show the help panel */ -wattrset (win, attributes[SCROLLWIN_BOX ]);box (win,0 ,0 ); -wattrset (win, attributes[SCROLLWIN_HEADING ]);mvwprintw (win,0 ,3 ," %s " , title); panel =new_panel (win);
Signature · 1 line
1.7.1.rc1.21.gf3bd6
Quoted 36 lines · Justin P. Mattock
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCCscripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:304:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:397:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:399:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:404:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:549:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/KconfigI looked around for a way to fix these, but am not familiar with ncurses. if there's a better way let me know and/or send a seperate fix.
Signed-off-by Justin P. Mattock <[email protected]>--- scripts/kconfig/nconf.gui.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-)scripts/kconfig/nconf.gui.c +0
-0
scripts/kconfig/nconf.gui.c void print_in_middle(WINDOW *win, · line 170
Quoted 4 lines
scripts/kconfig/nconf.gui.c +0
-1@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length =strlen (string); temp = (width - length) /2 ; x = startx + (int )temp; -wattrset (win, color);
Huh? :) This change makes nconfig look black and white. I'm all for eliminating warnings, but please do not eliminate features at the same time (or submit a patch with "Subject: make nconfig black and white" and do not mask it as warning fixes).
Michal
Quoted 47 lines · Michal Marek
Quoted 36 lines · Justin P. Mattock
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCCscripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:304:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:397:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:399:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:404:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:549:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/KconfigI looked around for a way to fix these, but am not familiar with ncurses. if there's a better way let me know and/or send a seperate fix.
Signed-off-by Justin P. Mattock<[email protected]>--- scripts/kconfig/nconf.gui.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-)scripts/kconfig/nconf.gui.c +0
-0scripts/kconfig/nconf.gui.c void print_in_middle(WINDOW *win, · line 170
Quoted 4 lines
scripts/kconfig/nconf.gui.c +0
-1@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length =strlen (string); temp = (width - length) /2 ; x = startx + (int )temp; -wattrset (win, color);Huh? :) This change makes nconfig look black and white. I'm all for eliminating warnings, but please do not eliminate features at the same time (or submit a patch with "Subject: make nconfig black and white" and do not mask it as warning fixes).
Quoted 2 lines
Michal
hmm.. make nconfig is black and white even without this patch, is that normal?
as for the patch not real sure how to handle these(ncurses), but at least you know now.. as for masking this with warning fixes.. ouch!! that's a first... these are what gcc 4.6 are giving me not the other way around my friend.
I guess I'll put a big fat NAK on there then and throw this in my NAK pile etc...
Justin P. Mattock
2010/8/3 Justin P. Mattock <[email protected]>:
Quoted 50 lines · Michal Marek
Quoted 49 lines · Justin P. Mattock
Quoted 37 lines
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCC scripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:304:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:397:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:399:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:404:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:549:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used HOSTLD scripts/kconfig/nconfscripts/kconfig/nconfarch/x86/KconfigI looked around for a way to fix these, but am not familiar with ncurses. if there's a better way let me know and/or send a seperate fix.
Signed-off-by Justin P. Mattock<[email protected]>---
scripts/kconfig/nconf.gui.c | 11 -----------1 files changed, 0 insertions(+), 11 deletions(-)scripts/kconfig/nconf.gui.c +0
-0scripts/kconfig/nconf.gui.c void print_in_middle(WINDOW *win, · line 170
Quoted 4 lines
scripts/kconfig/nconf.gui.c +0
-1@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length = strlen(string); temp = (width - length) / 2; x = startx + (int)temp; - wattrset(win, color);Huh? :) This change makes nconfig look black and white. I'm all for eliminating warnings, but please do not eliminate features at the same time (or submit a patch with "Subject: make nconfig black and white" and do not mask it as warning fixes).
Quoted 5 lines
Quoted 2 lines
Michal
hmm.. make nconfig is black and white even without this patch, is that normal?
No. It should be using colors. Which terminal are you using? Also, make sure you do not have the wide characters version of ncurses installed.
Quoted 4 lines
as for the patch not real sure how to handle these(ncurses), but at least you know now.. as for masking this with warning fixes.. ouch!! that's a first... these are what gcc 4.6 are giving me not the other way around my friend.
These warnings are all noise, but should be solved in the last patch I sent Michal.
Cheers.
Quoted 54 lines · Nir Tzachar
2010/8/3 Justin P. Mattock<[email protected]>:
Quoted 53 lines · Michal Marek
Quoted 51 lines · Justin P. Mattock
Quoted 37 lines
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCCscripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:304:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:397:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:399:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:404:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:549:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/KconfigI looked around for a way to fix these, but am not familiar with ncurses. if there's a better way let me know and/or send a seperate fix.
Signed-off-by Justin P. Mattock<[email protected]>--- scripts/kconfig/nconf.gui.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-)scripts/kconfig/nconf.gui.c +0
-0scripts/kconfig/nconf.gui.c void print_in_middle(WINDOW *win, · line 170
Quoted 4 lines
scripts/kconfig/nconf.gui.c +0
-1@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length =strlen (string); temp = (width - length) /2 ; x = startx + (int )temp; -wattrset (win, color);Huh? :) This change makes nconfig look black and white. I'm all for eliminating warnings, but please do not eliminate features at the same time (or submit a patch with "Subject: make nconfig black and white" and do not mask it as warning fixes).
Michal
Quoted 6 lines
Quoted 2 lines
hmm.. make nconfig is black and white even without this patch, is that normal?
No. It should be using colors. Which terminal are you using? Also, make sure you do not have the wide characters version of ncurses installed.
Im using xterm.. ncurses was built with --enable-widec on both machines which probably explains why the whole black and white look.
Quoted 11 lines
Quoted 5 lines
as for the patch not real sure how to handle these(ncurses), but at least you know now.. as for masking this with warning fixes.. ouch!! that's a first... these are what gcc 4.6 are giving me not the other way around my friend.
These warnings are all noise, but should be solved in the last patch I sent Michal.
Cheers.
cool..
Justin P. Mattock
Quoted 61 lines · Justin P. Mattock
Quoted 60 lines · Nir Tzachar
2010/8/3 Justin P. Mattock<[email protected]>:
Quoted 57 lines · Michal Marek
Quoted 50 lines · Justin P. Mattock
Quoted 38 lines
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCC scripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:304:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:397:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:399:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:404:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:549:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used HOSTLD scripts/kconfig/nconfscripts/kconfig/nconfarch/x86/KconfigI looked around for a way to fix these, but am not familiar with ncurses.
if there's a better way let me know and/or send a seperate fix.Signed-off-by Justin P. Mattock<[email protected]>---
scripts/kconfig/nconf.gui.c | 11 -----------1 files changed, 0 insertions(+), 11 deletions(-)scripts/kconfig/nconf.gui.c +0
-0scripts/kconfig/nconf.gui.c void print_in_middle(WINDOW *win, · line 170
Quoted 4 lines
scripts/kconfig/nconf.gui.c +0
-1@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length = strlen(string); temp = (width - length) / 2; x = startx + (int)temp; - wattrset(win, color);Huh? :) This change makes nconfig look black and white. I'm all for eliminating warnings, but please do not eliminate features at the same time (or submit a patch with "Subject: make nconfig black and white" and do not mask it as warning fixes).
Quoted 2 lines
Michal
hmm.. make nconfig is black and white even without this patch, is that normal?
Quoted 6 lines
Quoted 3 lines
No. It should be using colors. Which terminal are you using? Also, make sure you do not have the wide characters version of ncurses installed.
Im using xterm.. ncurses was built with --enable-widec on both machines which probably explains why the whole black and white look.
There is a problem with ncurses compiled with wide characters support. We need to make sure nconfig is linked only against the regular version, and only the regular headers are used. If you are willing, take a look at scripts/kconfig/lxdialog/check-lxdialog.sh and see if removing all mentions of ncursesw fixes the problem.
There might also be a problem if your include files are set up incorrectly, that is, /usr/include/ncurses.h is actually from the wide version and you are linking against the regular version. I think someone mentioned this was a problem on debian.
Cheers.
Quoted 16 lines
Quoted 11 lines
Quoted 5 lines
as for the patch not real sure how to handle these(ncurses), but at least you know now.. as for masking this with warning fixes.. ouch!! that's a first... these are what gcc 4.6 are giving me not the other way around my friend.
These warnings are all noise, but should be solved in the last patch I sent Michal.
Cheers.
cool..
Justin P. Mattock
Quoted 67 lines · Nir Tzachar
Quoted 65 lines · Justin P. Mattock
Quoted 63 lines · Nir Tzachar
2010/8/3 Justin P. Mattock<[email protected]>:
Quoted 52 lines · Michal Marek
Quoted 50 lines · Justin P. Mattock
Quoted 38 lines
The below patch fixes some warning messages Im getting when doing make nconfig
make nconfig
HOSTCCscripts/kconfig/nconf.gui.oscripts/kconfig/nconf.gui.c: In function 'print_in_middle':scripts/kconfig/nconf.gui.c:170:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'btn_dialog':scripts/kconfig/nconf.gui.c:300:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:304:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'dialog_inputbox':scripts/kconfig/nconf.gui.c:395:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:397:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:399:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:404:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c: In function 'show_scroll_win':scripts/kconfig/nconf.gui.c:534:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:549:2: warning: value computed is not usedscripts/kconfig/nconf.gui.c:551:2: warning: value computed is not used
HOSTLDscripts/kconfig/nconfscripts/kconfig/nconfarch/x86/KconfigI looked around for a way to fix these, but am not familiar with ncurses.
if there's a better way let me know and/or send a seperate fix.Signed-off-by Justin P. Mattock<[email protected]>--- scripts/kconfig/nconf.gui.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-)scripts/kconfig/nconf.gui.c +0
-0scripts/kconfig/nconf.gui.c void print_in_middle(WINDOW *win, · line 170
Quoted 4 lines
scripts/kconfig/nconf.gui.c +0
-1@@ -167,7 +167,6 @@ void print_in_middle(WINDOW *win, length =strlen (string); temp = (width - length) /2 ; x = startx + (int )temp; -wattrset (win, color);Huh? :) This change makes nconfig look black and white. I'm all for eliminating warnings, but please do not eliminate features at the same time (or submit a patch with "Subject: make nconfig black and white" and do not mask it as warning fixes).
Quoted 5 lines
Quoted 2 lines
Michal
hmm.. make nconfig is black and white even without this patch, is that normal?
No. It should be using colors. Which terminal are you using? Also, make sure you do not have the wide characters version of ncurses installed.
Quoted 9 lines
Quoted 2 lines
Im using xterm.. ncurses was built with --enable-widec on both machines which probably explains why the whole black and white look.
There is a problem with ncurses compiled with wide characters support. We need to make sure nconfig is linked only against the regular version, and only the regular headers are used. If you are willing, take a look at
scripts/kconfig/lxdialog/check-lxdialog.shand see if removing all mentions of ncursesw fixes the problem.
I'll have a look and see.
Quoted 8 lines
There might also be a problem if your include files are set up incorrectly, that is,
/usr/include/ncurses.his actually from the wide version and you are linking against the regular version. I think someone mentioned this was a problem on debian.Cheers.
ncurses is a bit funky to build i.e. my system is cblfs so I used this to build:
http://cross-lfs.org/view/clfs-sysroot/alpha/final-system/ncurses.html
from what I remember I built ncurses normally, then rebuilt with the newer libs(*++w.a) or widec etc.. things get a bit confusing with the symlinks in there. (main reason(I think)for doing this at the time is the screen for the nvidia drivers gets all messd up without the widec switch turned on)
Anyways I'll have a look and see.
Justin P. Mattock