Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: fix compiler warnings



The attached patch fixes an unused-variable warning, two warnings
about static variables that were defined but never used, and several
warnings about prototyped static functions that are never defined.
(All these warnings only showed up if HAVE_TIGETSTR was not defined.)

I went ahead and checked this into CVS.

..wayne..
Index: Src/Modules/terminfo.c
@@ -30,13 +30,14 @@
 #include "terminfo.mdh"
 #include "terminfo.pro"
 
+/**/
+#ifdef HAVE_TIGETSTR
+
 static char terminfo_nam[] = "terminfo";
 static Param terminfo_pm;
 
 /* echoti: output a terminfo capability */
 
-#ifdef HAVE_TIGETSTR
-
 /**/
 static int
 bin_echoti(char *name, char **argv, char *ops, int func)
@@ -79,11 +80,13 @@
     return 0;
 }
 
-#else
+/**/
+#else /* !HAVE_TIGETSTR */
 
 #define bin_echoti bin_notavail
 
-#endif
+/**/
+#endif /* !HAVE_TIGETSTR */
 
 static struct builtin bintab[] = {
     BUILTIN("echoti", 0, bin_echoti, 1, -1, 0, NULL, NULL),
@@ -93,6 +96,7 @@
 
 static int incleanup;
 
+/**/
 #ifdef HAVE_TIGETSTR
 
 /* Empty dummy function for special hash parameters. */
@@ -195,6 +199,7 @@
 {
 }
 
+/**/
 #endif /* HAVE_TIGETSTR */
 
 /**/
@@ -225,7 +230,9 @@
 int
 cleanup_(Module m)
 {
+#ifdef HAVE_TIGETSTR
     Param pm;
+#endif
 
     incleanup = 1;
 


Messages sorted by: Reverse Date, Date, Thread, Author