1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-21 21:15:03 -05:00

Add some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6

-Wunused-but-set-variable.

[originally from svn r9112]
This commit is contained in:
Jacob Nevins 2011-03-01 23:10:16 +00:00
parent 5eb70af8b1
commit d5790e1e72

View File

@ -1889,13 +1889,18 @@ static void check_selection(Terminal *term, pos from, pos to)
static void scroll(Terminal *term, int topline, int botline, int lines, int sb) static void scroll(Terminal *term, int topline, int botline, int lines, int sb)
{ {
termline *line; termline *line;
int i, seltop, olddisptop, shift; int i, seltop;
#ifdef OPTIMISE_SCROLL
int olddisptop, shift;
#endif /* OPTIMISE_SCROLL */
if (topline != 0 || term->alt_which != 0) if (topline != 0 || term->alt_which != 0)
sb = FALSE; sb = FALSE;
#ifdef OPTIMISE_SCROLL
olddisptop = term->disptop; olddisptop = term->disptop;
shift = lines; shift = lines;
#endif /* OPTIMISE_SCROLL */
if (lines < 0) { if (lines < 0) {
while (lines < 0) { while (lines < 0) {
line = delpos234(term->screen, botline); line = delpos234(term->screen, botline);