From: Philip Hazel Date: Tue, 5 Sep 2006 14:05:43 +0000 (+0000) Subject: An update to gcc 4 threw up some new uninitialized variable and signed vs X-Git-Tag: exim-4_64~92 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=91ecef39cad37bb5de008f557bded8dcbc8aa6e3;p=exim.git An update to gcc 4 threw up some new uninitialized variable and signed vs unsigned compiler warnings. --- diff --git a/src/src/acl.c b/src/src/acl.c index 086fa68fd..6c06e466c 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.62 2006/06/28 16:00:23 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.63 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2363,7 +2363,7 @@ acl_check_condition(int verb, acl_condition_block *cb, int where, { uschar *user_message = NULL; uschar *log_message = NULL; -uschar *p; +uschar *p = NULL; int rc = OK; #ifdef WITH_CONTENT_SCAN int sep = '/'; diff --git a/src/src/auths/pwcheck.c b/src/src/auths/pwcheck.c index 115c1454d..e90c50fd6 100644 --- a/src/src/auths/pwcheck.c +++ b/src/src/auths/pwcheck.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/auths/pwcheck.c,v 1.2 2005/06/27 14:29:44 ph10 Exp $ */ +/* $Cambridge: exim/src/src/auths/pwcheck.c,v 1.3 2006/09/05 14:05:43 ph10 Exp $ */ /* SASL server API implementation * Rob Siemborski @@ -183,7 +183,7 @@ int saslauthd_verify_password(const uschar *userid, const uschar *realm, const uschar **reply) { - uschar *daemon_reply; + uschar *daemon_reply = NULL; int s, r; struct sockaddr_un srvaddr; diff --git a/src/src/expand.c b/src/src/expand.c index 4cd98f7d4..5da6f99b8 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/expand.c,v 1.58 2006/04/18 11:13:19 ph10 Exp $ */ +/* $Cambridge: exim/src/src/expand.c,v 1.59 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -3662,7 +3662,7 @@ while (*s != 0) { /* Handle an IP (internet) domain */ - if (strncmp(sub_arg[0], "inet:", 5) == 0) + if (Ustrncmp(sub_arg[0], "inet:", 5) == 0) { BOOL connected = FALSE; int namelen, port; diff --git a/src/src/filter.c b/src/src/filter.c index 319c03f6c..d30afb8dd 100644 --- a/src/src/filter.c +++ b/src/src/filter.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/filter.c,v 1.12 2006/08/21 11:31:43 fanf2 Exp $ */ +/* $Cambridge: exim/src/src/filter.c,v 1.13 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1433,7 +1433,7 @@ Returns: TRUE if the condition is met static BOOL test_condition(condition_block *c, BOOL toplevel) { -BOOL yield; +BOOL yield = FALSE; const pcre *re; uschar *exp[2], *p, *pp; const uschar *regcomp_error = NULL; diff --git a/src/src/host.c b/src/src/host.c index 4d637fb51..fdaab31e5 100644 --- a/src/src/host.c +++ b/src/src/host.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/host.c,v 1.24 2006/04/04 11:18:31 ph10 Exp $ */ +/* $Cambridge: exim/src/src/host.c,v 1.25 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1936,7 +1936,7 @@ for (i = 1; i <= times; i++) { BOOL ipv4_addr; - int error_num; + int error_num = 0; struct hostent *hostdata; #if HAVE_IPV6 diff --git a/src/src/lookups/pgsql.c b/src/src/lookups/pgsql.c index 9c0c647c0..d151e7854 100644 --- a/src/src/lookups/pgsql.c +++ b/src/src/lookups/pgsql.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/lookups/pgsql.c,v 1.7 2006/07/14 14:42:57 ph10 Exp $ */ +/* $Cambridge: exim/src/src/lookups/pgsql.c,v 1.8 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -128,7 +128,7 @@ Arguments: server the server string; this is in dynamic memory and can be updated resultptr where to store the result errmsg where to point an error message - defer_break TRUE if no more servers are to be tried after DEFER + defer_break set TRUE if no more servers are to be tried after DEFER do_cache set FALSE if data is changed Returns: OK, FAIL, or DEFER @@ -265,7 +265,6 @@ if (cn == NULL) *errmsg = string_sprintf("PGSQL connection failed: %s", PQerrorMessage(pg_conn)); PQfinish(pg_conn); - *defer_break = FALSE; goto PGSQL_EXIT; } @@ -328,7 +327,6 @@ else *errmsg = string_sprintf("PGSQL: query failed: %s (%s) (%s)\n", PQresultErrorMessage(pg_result), PQresStatus(PQresultStatus(pg_result)), query); - *defer_break = FALSE; goto PGSQL_EXIT; } @@ -429,7 +427,7 @@ DEBUG(D_lookup) debug_printf("PGSQL query: %s\n", query); while ((server = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) { - BOOL defer_break; + BOOL defer_break = FALSE; int rc = perform_pgsql_search(query, server, result, errmsg, &defer_break, do_cache); if (rc != DEFER || defer_break) return rc; diff --git a/src/src/rda.c b/src/src/rda.c index 87561c9f8..1c7fa7dcb 100644 --- a/src/src/rda.c +++ b/src/src/rda.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/rda.c,v 1.12 2006/02/07 11:19:00 ph10 Exp $ */ +/* $Cambridge: exim/src/src/rda.c,v 1.13 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -352,7 +352,7 @@ uschar *data; if (rdata->isfile) { - int yield; + int yield = 0; data = rda_get_file_contents(rdata, options, error, &yield); if (data == NULL) return yield; } diff --git a/src/src/sieve.c b/src/src/sieve.c index 1dcb7795f..425a0b9e0 100644 --- a/src/src/sieve.c +++ b/src/src/sieve.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/sieve.c,v 1.21 2006/04/25 10:44:57 ph10 Exp $ */ +/* $Cambridge: exim/src/src/sieve.c,v 1.22 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2886,7 +2886,7 @@ while (*filter->pc) } else { - struct String qp; + struct String qp = { NULL, 0 }; /* Keep compiler happy (PH) */ capacity = 0; start = reason.length; diff --git a/src/src/spam.c b/src/src/spam.c index 25f724236..700200605 100644 --- a/src/src/spam.c +++ b/src/src/spam.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spam.c,v 1.12 2006/07/03 15:19:44 ph10 Exp $ */ +/* $Cambridge: exim/src/src/spam.c,v 1.13 2006/09/05 14:05:43 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -48,7 +48,7 @@ int spam(uschar **listptr) { #endif /* stop compiler warning */ - result = result; + result = 0; /* find the username from the option list */ if ((user_name = string_nextinlist(&list, &sep,