[exim-cvs] More compiler quietening.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] More compiler quietening.
Gitweb: http://git.exim.org/exim.git/commitdiff/e1d15f5e3b03bccb229281e762f9d47cf0933542
Commit:     e1d15f5e3b03bccb229281e762f9d47cf0933542
Parent:     d9d29e0555e6a3bf33cc616693d98c982796201f
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Nov 18 17:03:38 2012 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Nov 18 17:10:22 2012 +0000


    More compiler quietening.
---
 src/src/auths/call_pam.c       |    7 +++++--
 src/src/auths/call_radius.c    |    6 ++++--
 src/src/auths/cyrus_sasl.c     |    4 +++-
 src/src/auths/gsasl_exim.c     |    3 ++-
 src/src/auths/heimdal_gssapi.c |    4 +++-
 src/src/lookups/spf.c          |    4 +++-
 6 files changed, 20 insertions(+), 8 deletions(-)


diff --git a/src/src/auths/call_pam.c b/src/src/auths/call_pam.c
index bec5c57..710de7d 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 4bbe6d7..2064ed2 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 ca58928..c7fb593 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 8f75416..87be9b5 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 c6e973a..21ed75b 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 8622438..23ad2ad 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"