diff mbox

kconfig: fix unused var warnings

Message ID 1314451271-27151-1-git-send-email-Gregory.Dietsche@cuw.edu (mailing list archive)
State New, archived
Headers show

Commit Message

Greg Dietsche Aug. 27, 2011, 1:21 p.m. UTC
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(-)

Comments

Michal Marek Aug. 31, 2011, 2:34 p.m. UTC | #1
On 27.8.2011 15:21, Greg Dietsche wrote:
> 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>

This was fixed slightly differently by
https://lkml.org/lkml/2011/8/20/11. Thanks for the patch nevertheless.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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, ' ');
 	}