git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ecf14f2
)
Compiler quietening
author
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 23 Apr 2019 10:40:14 +0000
(11:40 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 23 Apr 2019 14:17:45 +0000
(15:17 +0100)
src/src/auths/plaintext.c
patch
|
blob
|
history
src/src/expand.c
patch
|
blob
|
history
src/src/header.c
patch
|
blob
|
history
src/src/ip.c
patch
|
blob
|
history
src/src/smtp_out.c
patch
|
blob
|
history
src/src/tls-openssl.c
patch
|
blob
|
history
src/src/transports/smtp.c
patch
|
blob
|
history
diff --git
a/src/src/auths/plaintext.c
b/src/src/auths/plaintext.c
index 6c9703554ae6dd72da2df53d7f0469cedaa54530..29c8b496ef4111d33d3edf32e6db52dcc9bf43ca 100644
(file)
--- a/
src/src/auths/plaintext.c
+++ b/
src/src/auths/plaintext.c
@@
-74,14
+74,14
@@
if (ob->client_send != NULL) ablock->client = TRUE;
/* For interface, see auths/README */
int
/* For interface, see auths/README */
int
-auth_plaintext_server(auth_instance *
ablock, uschar *
data)
+auth_plaintext_server(auth_instance *
ablock, uschar *
data)
{
{
-auth_plaintext_options_block *ob =
+auth_plaintext_options_block *
ob =
(auth_plaintext_options_block *)(ablock->options_block);
(auth_plaintext_options_block *)(ablock->options_block);
-const uschar *prompts = ob->server_prompts;
-uschar *
clear, *end, *
s;
+const uschar *
prompts = ob->server_prompts;
+uschar *
s;
int number = 1;
int number = 1;
-int
len,
rc;
+int rc;
int sep = 0;
/* Expand a non-empty list of prompt strings */
int sep = 0;
/* Expand a non-empty list of prompt strings */
@@
-143,7
+143,6
@@
auth_plaintext_options_block *ob =
(auth_plaintext_options_block *)(ablock->options_block);
const uschar * text = ob->client_send;
const uschar * s;
(auth_plaintext_options_block *)(ablock->options_block);
const uschar * text = ob->client_send;
const uschar * s;
-BOOL first = TRUE;
int sep = 0;
int auth_var_idx = 0, rc;
int flags = AUTH_ITEM_FIRST;
int sep = 0;
int auth_var_idx = 0, rc;
int flags = AUTH_ITEM_FIRST;
diff --git
a/src/src/expand.c
b/src/src/expand.c
index 2fc3a81f1bb337ed033d87329ab28f4fb056ca9d..ff1b72615150da75033ab136f2812d6377644436 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-976,47
+976,46
@@
vaguely_random_number(int max)
#ifdef SUPPORT_TLS
# undef vaguely_random_number
#endif
#ifdef SUPPORT_TLS
# undef vaguely_random_number
#endif
- static pid_t pid = 0;
- pid_t p2;
-#if defined(HAVE_SRANDOM) && !defined(HAVE_SRANDOMDEV)
- struct timeval tv;
-#endif
+static pid_t pid = 0;
+pid_t p2;
- p2 = getpid();
- if (p2 != pid)
+if ((p2 = getpid()) != pid)
+ {
+ if (pid != 0)
{
{
- if (pid != 0)
- {
#ifdef HAVE_ARC4RANDOM
#ifdef HAVE_ARC4RANDOM
-
/* cryptographically strong randomness, common on *BSD platforms, not
-
so much elsewhere. Alas. */
-#ifndef NOT_HAVE_ARC4RANDOM_STIR
-
arc4random_stir();
-#endif
+ /* cryptographically strong randomness, common on *BSD platforms, not
+ so much elsewhere. Alas. */
+#
ifndef NOT_HAVE_ARC4RANDOM_STIR
+ arc4random_stir();
+#
endif
#elif defined(HAVE_SRANDOM) || defined(HAVE_SRANDOMDEV)
#elif defined(HAVE_SRANDOM) || defined(HAVE_SRANDOMDEV)
-#ifdef HAVE_SRANDOMDEV
- /* uses random(4) for seeding */
- srandomdev();
-#else
- gettimeofday(&tv, NULL);
- srandom(tv.tv_sec | tv.tv_usec | getpid());
-#endif
+# ifdef HAVE_SRANDOMDEV
+ /* uses random(4) for seeding */
+ srandomdev();
+# else
+ {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ srandom(tv.tv_sec | tv.tv_usec | getpid());
+ }
+# endif
#else
#else
-
/* Poor randomness and no seeding here */
+ /* Poor randomness and no seeding here */
#endif
#endif
- }
- pid = p2;
}
}
+ pid = p2;
+ }
#ifdef HAVE_ARC4RANDOM
#ifdef HAVE_ARC4RANDOM
-
return arc4random() % max;
+return arc4random() % max;
#elif defined(HAVE_SRANDOM) || defined(HAVE_SRANDOMDEV)
#elif defined(HAVE_SRANDOM) || defined(HAVE_SRANDOMDEV)
-
return random() % max;
+return random() % max;
#else
#else
-
/* This one returns a 16-bit number, definitely not crypto-strong */
-
return random_number(max);
+/* This one returns a 16-bit number, definitely not crypto-strong */
+return random_number(max);
#endif
}
#endif
}
@@
-4934,7
+4933,7
@@
while (*s != 0)
client_conn_ctx cctx;
int timeout = 5;
int save_ptr = yield->ptr;
client_conn_ctx cctx;
int timeout = 5;
int save_ptr = yield->ptr;
- FILE * fp;
+ FILE * fp
= NULL
;
uschar * arg;
uschar * sub_arg[4];
uschar * server_name = NULL;
uschar * arg;
uschar * sub_arg[4];
uschar * server_name = NULL;
diff --git
a/src/src/header.c
b/src/src/header.c
index 19dbcc15d789e4b260ff62b246ecc507602a44e7..76ea10f132eee0aafa985dfb0767c8e7b952147d 100644
(file)
--- a/
src/src/header.c
+++ b/
src/src/header.c
@@
-93,7
+93,7
@@
static header_line *
header_add_backend(BOOL after, uschar *name, BOOL topnot, int type,
const char *format, va_list ap)
{
header_add_backend(BOOL after, uschar *name, BOOL topnot, int type,
const char *format, va_list ap)
{
-header_line *h, *new;
+header_line *h, *new
= NULL
;
header_line **hptr;
uschar *p, *q;
header_line **hptr;
uschar *p, *q;
@@
-110,10
+110,9
@@
string_from_gstring(&gs);
/* Find where to insert this header */
if (!name)
/* Find where to insert this header */
if (!name)
- {
if (after)
{
if (after)
{
- hptr = &
(header_last->next)
;
+ hptr = &
header_last->next
;
h = NULL;
}
else
h = NULL;
}
else
@@
-128,7
+127,6
@@
if (!name)
hptr = &header_list->next;
h = *hptr;
}
hptr = &header_list->next;
h = *hptr;
}
- }
else
{
else
{
@@
-159,7
+157,7
@@
else
for (;;)
{
if (!h->next || !header_testname(h, name, len, FALSE)) break;
for (;;)
{
if (!h->next || !header_testname(h, name, len, FALSE)) break;
- hptr = &
(h->next)
;
+ hptr = &
h->next
;
h = h->next;
}
}
h = h->next;
}
}
@@
-168,7
+166,7
@@
else
point, we have hptr pointing to the link field that will point to the new
header, and h containing the following header, or NULL. */
point, we have hptr pointing to the link field that will point to the new
header, and h containing the following header, or NULL. */
-for (p = q = buffer; *p
!= 0;
)
+for (p = q = buffer; *p
; p = q
)
{
for (;;)
{
{
for (;;)
{
@@
-184,10
+182,9
@@
for (p = q = buffer; *p != 0; )
new->next = h;
*hptr = new;
new->next = h;
*hptr = new;
- hptr = &
(new->next)
;
+ hptr = &
new->next
;
if (!h) header_last = new;
if (!h) header_last = new;
- p = q;
}
return new;
}
}
return new;
}
@@
-228,7
+225,6
@@
void
header_add_at_position(BOOL after, uschar *name, BOOL topnot, int type,
const char *format, ...)
{
header_add_at_position(BOOL after, uschar *name, BOOL topnot, int type,
const char *format, ...)
{
-header_line * h;
va_list ap;
va_start(ap, format);
(void) header_add_backend(after, name, topnot, type, format, ap);
va_list ap;
va_start(ap, format);
(void) header_add_backend(after, name, topnot, type, format, ap);
diff --git
a/src/src/ip.c
b/src/src/ip.c
index ff76b3871b4e89e98cabc5d6807e340407e99bb1..8b506109e32a2d8082adb22cc006873a891ae40e 100644
(file)
--- a/
src/src/ip.c
+++ b/
src/src/ip.c
@@
-331,7
+331,10
@@
if (fastopen_blob && f.tcp_fastopen_ok)
else
#endif /*TCP_FASTOPEN*/
{
else
#endif /*TCP_FASTOPEN*/
{
+#if defined(TCP_FASTOPEN) && defined(MSG_FASTOPEN)
legacy_connect:
legacy_connect:
+#endif
+
DEBUG(D_transport|D_v) if (fastopen_blob)
debug_printf("non-TFO mode connection attempt to %s, %lu data\n",
address, (unsigned long)fastopen_blob->len);
DEBUG(D_transport|D_v) if (fastopen_blob)
debug_printf("non-TFO mode connection attempt to %s, %lu data\n",
address, (unsigned long)fastopen_blob->len);
diff --git
a/src/src/smtp_out.c
b/src/src/smtp_out.c
index b7a8354797fa5c8b26ab0b60c1823ae839411976..4be7b9c179acb7de5dbf01973290a93de59e4316 100644
(file)
--- a/
src/src/smtp_out.c
+++ b/
src/src/smtp_out.c
@@
-695,12
+695,14
@@
smtp_read_response(void * sx0, uschar * buffer, int size, int okdigit,
{
smtp_context * sx = sx0;
uschar * ptr = buffer;
{
smtp_context * sx = sx0;
uschar * ptr = buffer;
-int count = 0
, rc
;
+int count = 0;
errno = 0; /* Ensure errno starts out zero */
#ifdef EXPERIMENTAL_PIPE_CONNECT
if (sx->pending_BANNER || sx->pending_EHLO)
errno = 0; /* Ensure errno starts out zero */
#ifdef EXPERIMENTAL_PIPE_CONNECT
if (sx->pending_BANNER || sx->pending_EHLO)
+ {
+ int rc;
if ((rc = smtp_reap_early_pipe(sx, &count)) != OK)
{
DEBUG(D_transport) debug_printf("failed reaping pipelined cmd responsess\n");
if ((rc = smtp_reap_early_pipe(sx, &count)) != OK)
{
DEBUG(D_transport) debug_printf("failed reaping pipelined cmd responsess\n");
@@
-708,6
+710,7
@@
if (sx->pending_BANNER || sx->pending_EHLO)
if (rc == DEFER) errno = ERRNO_TLSFAILURE;
return FALSE;
}
if (rc == DEFER) errno = ERRNO_TLSFAILURE;
return FALSE;
}
+ }
#endif
/* This is a loop to read and concatenate the lines that make up a multi-line
#endif
/* This is a loop to read and concatenate the lines that make up a multi-line
diff --git
a/src/src/tls-openssl.c
b/src/src/tls-openssl.c
index 7c91d9d8fbf5ade9df4d22b027140cb070db9446..c7b22a0db3e490a92ded847f197e470c428518b3 100644
(file)
--- a/
src/src/tls-openssl.c
+++ b/
src/src/tls-openssl.c
@@
-114,7
+114,9
@@
change this guard and punt the issue for a while longer. */
# ifndef EXIM_HAVE_OPENSSL_CIPHER_GET_ID
# define SSL_CIPHER_get_id(c) (c->id)
# endif
# ifndef EXIM_HAVE_OPENSSL_CIPHER_GET_ID
# define SSL_CIPHER_get_id(c) (c->id)
# endif
-# include "tls-cipher-stdname.c"
+# ifndef MACRO_PREDEF
+# include "tls-cipher-stdname.c"
+# endif
#endif
/*************************************************
#endif
/*************************************************
diff --git
a/src/src/transports/smtp.c
b/src/src/transports/smtp.c
index 3558fa65c7c73ddf5d8e61abe33ad73bc1a5df91..806c41fed3ed20268b18175c45dd961b58a2d48c 100644
(file)
--- a/
src/src/transports/smtp.c
+++ b/
src/src/transports/smtp.c
@@
-1073,9
+1073,9
@@
sync_responses(smtp_context * sx, int count, int pending_DATA)
address_item * addr = sx->sync_addr;
smtp_transport_options_block * ob = sx->conn_args.ob;
int yield = 0;
address_item * addr = sx->sync_addr;
smtp_transport_options_block * ob = sx->conn_args.ob;
int yield = 0;
-int rc;
#ifdef EXPERIMENTAL_PIPE_CONNECT
#ifdef EXPERIMENTAL_PIPE_CONNECT
+int rc;
if ((rc = smtp_reap_early_pipe(sx, &count)) != OK)
return rc == FAIL ? -4 : -5;
#endif
if ((rc = smtp_reap_early_pipe(sx, &count)) != OK)
return rc == FAIL ? -4 : -5;
#endif
@@
-1427,8
+1427,6
@@
if ( sx->esmtp
if ( require_auth == OK
|| verify_check_given_host(CUSS &ob->hosts_try_auth, host) == OK)
{
if ( require_auth == OK
|| verify_check_given_host(CUSS &ob->hosts_try_auth, host) == OK)
{
- auth_instance * au;
-
DEBUG(D_transport) debug_printf("scanning authentication mechanisms\n");
fail_reason = US"no common mechanisms were found";
DEBUG(D_transport) debug_printf("scanning authentication mechanisms\n");
fail_reason = US"no common mechanisms were found";
@@
-1441,6
+1439,7
@@
if ( sx->esmtp
client function. We are limited to supporting up to 16 authenticator
public-names by the number of bits in a short. */
client function. We are limited to supporting up to 16 authenticator
public-names by the number of bits in a short. */
+ auth_instance * au;
uschar bitnum;
int rc;
uschar bitnum;
int rc;
@@
-2496,7
+2495,9
@@
if ( smtp_peer_options & OPTION_TLS
/* TLS negotiation failed; give an error. From outside, this function may
be called again to try in clear on a new connection, if the options permit
it for this host. */
/* TLS negotiation failed; give an error. From outside, this function may
be called again to try in clear on a new connection, if the options permit
it for this host. */
-GNUTLS_CONN_FAILED:
+#ifdef USE_GNUTLS
+ GNUTLS_CONN_FAILED:
+#endif
DEBUG(D_tls) debug_printf("TLS session fail: %s\n", tls_errstr);
# ifdef SUPPORT_DANE
DEBUG(D_tls) debug_printf("TLS session fail: %s\n", tls_errstr);
# ifdef SUPPORT_DANE