public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig: fix unused var warnings
@ 2011-08-27 13:21 Greg Dietsche
  2011-08-31 14:34 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Dietsche @ 2011-08-27 13:21 UTC (permalink / raw)
  To: mmarek; +Cc: linux-kbuild, linux-kernel, Greg Dietsche

This patch corrects two warnings generated by `make menuconfig`:
 textbox.c:323:9: warning: variable ‘x’ set but not used
 textbox.c:323:6: warning: variable ‘y’ set but not used

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
 scripts/kconfig/lxdialog/textbox.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/lxdialog/textbox.c b/scripts/kconfig/lxdialog/textbox.c
index c704712..f619f4b 100644
--- a/scripts/kconfig/lxdialog/textbox.c
+++ b/scripts/kconfig/lxdialog/textbox.c
@@ -320,7 +320,6 @@ static void print_page(WINDOW * win, int height, int width)
  */
 static void print_line(WINDOW * win, int row, int width)
 {
-	int y, x;
 	char *line;
 
 	line = get_line();
@@ -329,11 +328,14 @@ static void print_line(WINDOW * win, int row, int width)
 	waddch(win, ' ');
 	waddnstr(win, line, MIN(strlen(line), width - 2));
 
-	getyx(win, y, x);
 	/* Clear 'residue' of previous line */
 #if OLD_NCURSES
 	{
 		int i;
+		int __attribute__ ((unused)) y;
+		int x;
+
+		getyx(win, y, x);
 		for (i = 0; i < width - x; i++)
 			waddch(win, ' ');
 	}
-- 
1.7.5.4


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

end of thread, other threads:[~2011-08-31 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-27 13:21 [PATCH] kconfig: fix unused var warnings Greg Dietsche
2011-08-31 14:34 ` Michal Marek

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