aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--acconfig.h3
-rw-r--r--configure.in7
-rw-r--r--driver.c7
4 files changed, 17 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 90771239..eacd4730 100644
--- 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.
diff --git a/acconfig.h b/acconfig.h
index b02cdf45..69607154 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -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
diff --git a/configure.in b/configure.in
index 3359249b..5ec3cdbc 100644
--- a/configure.in
+++ b/configure.in
@@ -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);
diff --git a/driver.c b/driver.c
index a09ed4fa..ae50f24e 100644
--- 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;