summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2012-11-18 17:03:38 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2012-11-18 17:10:22 +0000
commite1d15f5e3b03bccb229281e762f9d47cf0933542 (patch)
treea7ab6d329804970e1e35b96f195ed6ef86a4a7c1 /src
parentd9d29e0555e6a3bf33cc616693d98c982796201f (diff)
More compiler quietening.
Diffstat (limited to 'src')
-rw-r--r--src/src/auths/call_pam.c7
-rw-r--r--src/src/auths/call_radius.c6
-rw-r--r--src/src/auths/cyrus_sasl.c4
-rw-r--r--src/src/auths/gsasl_exim.c3
-rw-r--r--src/src/auths/heimdal_gssapi.c4
-rw-r--r--src/src/lookups/spf.c4
6 files changed, 20 insertions, 8 deletions
diff --git a/src/src/auths/call_pam.c b/src/src/auths/call_pam.c
index bec5c5744..710de7ded 100644
--- a/src/src/auths/call_pam.c
+++ b/src/src/auths/call_pam.c
@@ -16,10 +16,13 @@ available for compiling. Therefore, compile these functions only if SUPPORT_PAM
is defined. However, some compilers don't like compiling empty modules, so keep
them happy with a dummy when skipping the rest. Make it reference itself to
stop picky compilers complaining that it is unused, and put in a dummy argument
-to stop even pickier compilers complaining about infinite loops. */
+to stop even pickier compilers complaining about infinite loops.
+Then use a mutually-recursive pair as gcc is just getting stupid. */
#ifndef SUPPORT_PAM
-static void dummy(int x) { dummy(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
+static void dummy(int x) { dummy2(x-1); }
#else /* SUPPORT_PAM */
#ifdef PAM_H_IN_PAM
diff --git a/src/src/auths/call_radius.c b/src/src/auths/call_radius.c
index 4bbe6d754..2064ed221 100644
--- a/src/src/auths/call_radius.c
+++ b/src/src/auths/call_radius.c
@@ -20,10 +20,12 @@ RADIUS_CONFIG_FILE is defined. However, some compilers don't like compiling
empty modules, so keep them happy with a dummy when skipping the rest. Make it
reference itself to stop picky compilers complaining that it is unused, and put
in a dummy argument to stop even pickier compilers complaining about infinite
-loops. */
+loops. Then use a mutually-recursive pair as gcc is just getting stupid. */
#ifndef RADIUS_CONFIG_FILE
-static void dummy(int x) { dummy(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
+static void dummy(int x) { dummy2(x-1); }
#else /* RADIUS_CONFIG_FILE */
diff --git a/src/src/auths/cyrus_sasl.c b/src/src/auths/cyrus_sasl.c
index ca589287e..c7fb59348 100644
--- a/src/src/auths/cyrus_sasl.c
+++ b/src/src/auths/cyrus_sasl.c
@@ -25,7 +25,9 @@ in a dummy argument to stop even pickier compilers complaining about infinite
loops. */
#ifndef AUTH_CYRUS_SASL
-static void dummy(int x) { dummy(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
+static void dummy(int x) { dummy2(x-1); }
#else
diff --git a/src/src/auths/gsasl_exim.c b/src/src/auths/gsasl_exim.c
index 8f7541642..87be9b5e1 100644
--- a/src/src/auths/gsasl_exim.c
+++ b/src/src/auths/gsasl_exim.c
@@ -29,7 +29,8 @@ sense in all contexts. For some, we can do checks at init time.
#ifndef AUTH_GSASL
/* dummy function to satisfy compilers when we link in an "empty" file. */
-static void dummy2(int x) { dummy2(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
static void dummy(int x) { dummy2(x-1); }
#else
diff --git a/src/src/auths/heimdal_gssapi.c b/src/src/auths/heimdal_gssapi.c
index c6e973ad9..21ed75bf4 100644
--- a/src/src/auths/heimdal_gssapi.c
+++ b/src/src/auths/heimdal_gssapi.c
@@ -43,7 +43,9 @@ Without rename, we could add an option for GS2 support in the future.
#ifndef AUTH_HEIMDAL_GSSAPI
/* dummy function to satisfy compilers when we link in an "empty" file. */
-static void dummy(int x) { dummy(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
+static void dummy(int x) { dummy2(x-1); }
#else
#include <gssapi/gssapi.h>
diff --git a/src/src/lookups/spf.c b/src/src/lookups/spf.c
index 862243850..23ad2addd 100644
--- a/src/src/lookups/spf.c
+++ b/src/src/lookups/spf.c
@@ -18,7 +18,9 @@
#include "../exim.h"
#ifndef EXPERIMENTAL_SPF
-static void dummy(int x) { dummy(x-1); }
+static void dummy(int x);
+static void dummy2(int x) { dummy(x-1); }
+static void dummy(int x) { dummy2(x-1); }
#else
#include "lf_functions.h"