]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cal: fix compiler warning on systems without term libs
authorKarel Zak <kzak@redhat.com>
Tue, 15 Oct 2013 13:44:40 +0000 (15:44 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Oct 2013 13:44:40 +0000 (15:44 +0200)
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/cal.c

index dacc7a711027c46777935d031952de4a14540602..f91bc8ebea96bf0d197173de035ceb0b1d3f2212 100644 (file)
@@ -135,10 +135,12 @@ static void my_putstring(char *s)
 
 #endif /* end of LIBTERMCAP / NCURSES */
 
-
+#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) || defined(HAVE_LIBTERMCAP)
 static const char      *term="";
-static const char      *Senter="", *Sexit="";/* enter and exit standout mode */
 static int             Slen;           /* strlen of Senter+Sexit */
+#endif
+
+static const char      *Senter="", *Sexit="";/* enter and exit standout mode */
 static char            *Hrow;          /* pointer to highlighted row in month */
 
 #include "widechar.h"