We currently don't use 'cols' - which causes a warning because
it is set by an assignment inside a macro..
The trick to quiet to warning causes different warnings on other
compilers.
We could just do
rows = getmaxy()
but that is 'legacy' so I'd rather not.
So just find somewhere to use cols..
Reported-by: "P. Martin" <mrsmiley98@lycos.com>
Signed-off-by: NeilBrown <neilb@suse.de>
if (refresh) {
refresh = 0;
getmaxyx(stdscr, rows, cols);
- cols = cols; /* Silence warning that 'cols' isn't used */
+
if (row >= rows + 3)
row = (rows+1)/2;
if (row >= rows)
}
{char bb[20];
sprintf(bb, "%d", c);
- mvaddstr(0, 70, bb);
+ mvaddstr(0, cols-strlen(bb), bb);
clrtoeol();
}
move(row, 9);