]> Pileus Git - ~andy/fetchmail/commitdiff
-Wall cleanup, second phase.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 20 Oct 1998 06:40:04 +0000 (06:40 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 20 Oct 1998 06:40:04 +0000 (06:40 -0000)
svn path=/trunk/; revision=2121

NEWS
acconfig.h
configure.in
driver.c

diff --git a/NEWS b/NEWS
index 907712390cb90acd1e9a60eb33341ffb24c55b59..eacd47306a0a3a522f3220e6515e3f0b6418a676 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ fetchmail-4.6.3 ():
   compile-time options have been enabled, and uses it to control
   the choices in various panels.
 * Added `properties' option for extension scripts.
+* gcc -Wall cleanup
 
 There are 250 people on fetchmail-friends and 294 on fetchmail-announce.
 
index b02cdf45172caac38e7600e6529789659554d423..69607154d8840d5aa1b5b3a9244f4465372ee612 100644 (file)
@@ -23,6 +23,9 @@
 /* Define if your C compiler allows void * as a function result */
 #undef HAVE_VOIDPOINTER
 
+/* Define if your C compiler allows ANSI volatile */
+#undef HAVE_VOLATILE
+
 /* Define if `union wait' is the type of the first arg to wait functions.  */
 #undef HAVE_UNION_WAIT
 
index 3359249bf0723b03538b07098aa41c8d22381157..5ec3cdbcd897d837bd64d2bfb492597dd312524a 100644 (file)
@@ -108,6 +108,13 @@ AC_TRY_COMPILE([],
  [AC_DEFINE(HAVE_VOIDPOINTER) AC_MSG_RESULT(yes)],
  AC_MSG_RESULT(no))
 
+dnl Check for ANSI volatile
+AC_MSG_CHECKING(for ANSI volatile)
+AC_TRY_COMPILE([],
+   [volatile int n;],
+ [AC_DEFINE(HAVE_VOLATILE) AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+
 dnl Check out the wait reality.  We have to assume sys/wait.h is present.
 AC_CHECK_FUNCS(waitpid wait3)
 AC_MSG_CHECKING(for union wait);
index a09ed4fa04eda5607a5307fd06f2938fa636480b..ae50f24e976cbeb637b2e05bbac813b7f2916cd9 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -1305,7 +1305,12 @@ int do_protocol(ctl, proto)
 struct query *ctl;             /* parsed options with merged-in defaults */
 const struct method *proto;    /* protocol method table */
 {
-    int ok, js, sock = -1;
+    int ok, js;
+#ifdef HAVE_VOLATILE
+    volatile int sock = -1;    /* pacifies -Wall */
+#else
+    int sock = -1;
+#endif /* HAVE_VOLATILE */
     char *msg;
     void (*sigsave)();
     struct idlist *current=NULL, *tmp=NULL;