aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCristian Ionescu-Idbohrn <cii@axis.com>2011-05-01 14:43:53 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-05-01 14:43:53 +0200
commitfcbc641fe36a2ceff334362cc6ba62b000c842a5 (patch)
tree656ae5a8772a7d284b6fcb3d9272c935af5097b2 /scripts
parent2cfb57647b072900b5e66977c500c6ee0978dd0e (diff)
downloadbusybox-w32-fcbc641fe36a2ceff334362cc6ba62b000c842a5.tar.gz
busybox-w32-fcbc641fe36a2ceff334362cc6ba62b000c842a5.tar.bz2
busybox-w32-fcbc641fe36a2ceff334362cc6ba62b000c842a5.zip
get rid of several "variable 'x' set but not used" warnings
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c11
-rw-r--r--scripts/kconfig/lxdialog/textbox.c8
2 files changed, 5 insertions, 14 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 6e097889f..ea2446a89 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -173,7 +173,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
173int conf_string(struct menu *menu) 173int conf_string(struct menu *menu)
174{ 174{
175 struct symbol *sym = menu->sym; 175 struct symbol *sym = menu->sym;
176 const char *def, *help; 176 const char *def;
177 177
178 while (1) { 178 while (1) {
179 printf("%*s%s ", indent - 1, "", menu->prompt->text); 179 printf("%*s%s ", indent - 1, "", menu->prompt->text);
@@ -188,10 +188,7 @@ int conf_string(struct menu *menu)
188 case '?': 188 case '?':
189 /* print help */ 189 /* print help */
190 if (line[1] == '\n') { 190 if (line[1] == '\n') {
191 help = nohelp_text; 191 printf("\n%s\n", menu->sym->help ? menu->sym->help : nohelp_text);
192 if (menu->sym->help)
193 help = menu->sym->help;
194 printf("\n%s\n", menu->sym->help);
195 def = NULL; 192 def = NULL;
196 break; 193 break;
197 } 194 }
@@ -207,7 +204,6 @@ int conf_string(struct menu *menu)
207static int conf_sym(struct menu *menu) 204static int conf_sym(struct menu *menu)
208{ 205{
209 struct symbol *sym = menu->sym; 206 struct symbol *sym = menu->sym;
210 int type;
211 tristate oldval, newval; 207 tristate oldval, newval;
212 const char *help; 208 const char *help;
213 209
@@ -215,7 +211,6 @@ static int conf_sym(struct menu *menu)
215 printf("%*s%s ", indent - 1, "", menu->prompt->text); 211 printf("%*s%s ", indent - 1, "", menu->prompt->text);
216 if (sym->name) 212 if (sym->name)
217 printf("(%s) ", sym->name); 213 printf("(%s) ", sym->name);
218 type = sym_get_type(sym);
219 putchar('['); 214 putchar('[');
220 oldval = sym_get_tristate_value(sym); 215 oldval = sym_get_tristate_value(sym);
221 switch (oldval) { 216 switch (oldval) {
@@ -282,11 +277,9 @@ static int conf_choice(struct menu *menu)
282{ 277{
283 struct symbol *sym, *def_sym; 278 struct symbol *sym, *def_sym;
284 struct menu *child; 279 struct menu *child;
285 int type;
286 bool is_new; 280 bool is_new;
287 281
288 sym = menu->sym; 282 sym = menu->sym;
289 type = sym_get_type(sym);
290 is_new = !sym_has_value(sym); 283 is_new = !sym_has_value(sym);
291 if (sym_is_changable(sym)) { 284 if (sym_is_changable(sym)) {
292 conf_sym(menu); 285 conf_sym(menu);
diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index 77848bb8e..de4ae41d7 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -38,11 +38,8 @@ int dialog_textbox(const char *title, const char *file, int height, int width)
38{ 38{
39 int i, x, y, cur_x, cur_y, fpos, key = 0; 39 int i, x, y, cur_x, cur_y, fpos, key = 0;
40 int passed_end; 40 int passed_end;
41 char search_term[MAX_LEN + 1];
42 WINDOW *dialog, *text; 41 WINDOW *dialog, *text;
43 42
44 search_term[0] = '\0'; /* no search term entered yet */
45
46 /* Open input file for reading */ 43 /* Open input file for reading */
47 if ((fd = open(file, O_RDONLY)) == -1) { 44 if ((fd = open(file, O_RDONLY)) == -1) {
48 endwin(); 45 endwin();
@@ -437,7 +434,6 @@ static void print_page(WINDOW * win, int height, int width)
437 */ 434 */
438static void print_line(WINDOW * win, int row, int width) 435static void print_line(WINDOW * win, int row, int width)
439{ 436{
440 int y, x;
441 char *line; 437 char *line;
442 438
443 line = get_line(); 439 line = get_line();
@@ -446,11 +442,13 @@ static void print_line(WINDOW * win, int row, int width)
446 waddch(win, ' '); 442 waddch(win, ' ');
447 waddnstr(win, line, MIN(strlen(line), width - 2)); 443 waddnstr(win, line, MIN(strlen(line), width - 2));
448 444
449 getyx(win, y, x);
450 /* Clear 'residue' of previous line */ 445 /* Clear 'residue' of previous line */
451#if OLD_NCURSES 446#if OLD_NCURSES
452 { 447 {
453 int i; 448 int i;
449 int y, x;
450
451 getyx(win, y, x);
454 for (i = 0; i < width - x; i++) 452 for (i = 0; i < width - x; i++)
455 waddch(win, ' '); 453 waddch(win, ' ');
456 } 454 }