]> granicus.if.org Git - postgresql/commitdiff
Fix compiler warning for non-TIOCGWINSZ case
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 28 Sep 2015 22:42:30 +0000 (18:42 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 28 Sep 2015 22:42:30 +0000 (18:42 -0400)
Backpatch to 9.5 where the error was introduced.

src/bin/psql/print.c

index 74298cfe441ff52f512a6366ed3a1792e4910ff9..ad4350e1fe0a7f10b37331492f9d3c3aca34235d 100644 (file)
@@ -2747,10 +2747,10 @@ PageOutput(int lines, const printTableOpt *topt)
        {
                const char *pagerprog;
                FILE       *pagerpipe;
-               unsigned short int pager = topt->pager;
-               int                     min_lines = topt->pager_min_lines;
 
 #ifdef TIOCGWINSZ
+               unsigned short int pager = topt->pager;
+               int                     min_lines = topt->pager_min_lines;
                int                     result;
                struct winsize screen_size;