summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2010-11-02 17:06:37 +0000
committerStef Walter <stef@thewalter.net>2011-01-23 15:47:45 -0600
commitd7ffc57442e111f3bf4236fb03896c21cb1022a4 (patch)
treebed8d4adb64488709ad3388583ad26a3361829f9
parent57751190780ee8974075a5d16e7bacd6991eebba (diff)
Fix compiler warnings.
-rw-r--r--.gitignore1
-rw-r--r--common/smtppass.c17
-rw-r--r--configure.in17
3 files changed, 18 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 91bfdf5..6c4df4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@ Makefile.in
*~
*.tar.gz
+/compile
/test
/install-sh
/configure
diff --git a/common/smtppass.c b/common/smtppass.c
index 411be49..b860042 100644
--- a/common/smtppass.c
+++ b/common/smtppass.c
@@ -219,7 +219,6 @@ static int parse_config_file(const char* configfile);
static char* parse_address(char* line);
static char* parse_xforward(char* line, const char* part);
static const char* get_successful_rsp(const char* line, int* cont);
-static const char* get_continue_rsp(const char* line);
static void do_server_noop(spctx_t* ctx);
/* Used externally in some cases */
@@ -1334,20 +1333,6 @@ static char* parse_xforward(char* line, const char* part)
return t;
}
-static const char* get_continue_rsp(const char* line)
-{
- /*
- * We check for '3XX xxx' type replies
- */
-
- line = trim_start(line);
-
- if(line[0] == '3' && isdigit(line[1]) && isdigit(line[2]) && line[3] == ' ')
- return line + 4;
-
- return NULL;
-}
-
static const char* get_successful_rsp(const char* line, int* cont)
{
/*
@@ -1852,8 +1837,6 @@ int sp_pass_data(spctx_t* ctx)
return -1;
}
- sp_messagex(ctx, LOG_DEBUG, "skipped email data");
-
/* Okay read the response from the server and echo it to the client */
if(read_server_response(ctx) == -1)
return -1;
diff --git a/configure.in b/configure.in
index c5de976..9fb4744 100644
--- a/configure.in
+++ b/configure.in
@@ -43,6 +43,7 @@ AM_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
@@ -186,6 +187,21 @@ else
fi
# --------------------------------------------------------------------
+# Strict Mode
+
+# Strict mode
+AC_ARG_ENABLE(strict,
+ AC_HELP_STRING([--enable-strict],
+ [Compile with all warnings strictly enabled]))
+
+if test "$enable_strict" = "yes"; then
+ CFLAGS="$CFLAGS -Wall -Werror"
+ echo "enabling strict compile mode"
+else
+ enable_strict="no"
+fi
+
+# --------------------------------------------------------------------
# Have to resolve this for the path below
if test "${prefix}" = "NONE"; then
@@ -204,4 +220,5 @@ echo "
True transparent proxy: $enable_tproxy --enable-tproxy
Capabalities: $enable_capabilities --enable-capabilities, libcap2
Debug Mode: $enable_debug --enable-debug
+Strict Mode: $enable_strict --enable-strict
"