kconfig: lxdialog: textbox: Fix compilation warnings

x, y are only used if OLD_NCURSES is set. Add the declaration in its
scope.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
This commit is contained in:
Igor Belwon authored and Ивайло Иванов committed 2025-10-01 22:17:28 +03:00
1 parent c9c6116afd
commit cb549596c0
1 file changed
+2 -3
+2 -3
View File
@@ -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,11 @@ 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 i, x, y;
getyx(win, y, x);
for (i = 0; i < width - x; i++)
waddch(win, ' ');
}