]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Add some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Tue, 1 Mar 2011 23:10:16 +0000 (23:10 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Tue, 1 Mar 2011 23:10:16 +0000 (23:10 +0000)
-Wunused-but-set-variable.

[originally from svn r9112]

terminal.c

index ba504d439bfe9d90998a378d471a73a990428fc9..0ba3060dbd085a48ea0ff74752a7a3a841046f2f 100644 (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)
 {
     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);