From: jacob Date: Tue, 1 Mar 2011 23:10:16 +0000 (+0000) Subject: Add some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6 X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/a8375a4df3d86e240791b26df525e5fb0e458d5a Add some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6 -Wunused-but-set-variable. git-svn-id: svn://svn.tartarus.org/sgt/putty@9112 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/terminal.c b/terminal.c index ba504d43..0ba3060d 100644 --- a/terminal.c +++ b/terminal.c @@ -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) { 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) sb = FALSE; +#ifdef OPTIMISE_SCROLL olddisptop = term->disptop; shift = lines; +#endif /* OPTIMISE_SCROLL */ if (lines < 0) { while (lines < 0) { line = delpos234(term->screen, botline);