]> granicus.if.org Git - procps-ng/commitdiff
top: the '#define SCROLLVAR_NO' is bent but not broken
authorJim Warner <james.warner@comcast.net>
Tue, 14 Aug 2018 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 12 Sep 2018 11:27:46 +0000 (21:27 +1000)
This patch simply avoids an 'unused' variable warning.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index 057c60af014418f4a9b956066d39c26805ac1916..46ffdc510232e343c3ca4f222e932c0c3c042ba9 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -904,7 +904,10 @@ static int show_pmt (const char *str) {
         /*
          * Create and print the optional scroll coordinates message */
 static void show_scroll (void) {
-   char tmp1[SMLBUFSIZ], tmp2[SMLBUFSIZ];
+   char tmp1[SMLBUFSIZ];
+#ifndef SCROLLVAR_NO
+   char tmp2[SMLBUFSIZ];
+#endif
    int totpflgs = Curwin->totpflgs;
    int begpflgs = Curwin->begpflg + 1;