summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-08-03 16:42:19 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2019-08-03 16:42:19 +0100
commit6d95688d6a272297a6a47f2fd2695cc8e5b8b730 (patch)
tree9f40642f7d7e6715d9a180681d8ed8e911ae17d0
parent613a03d42cf64f31e01db40a3c3d517b354d5389 (diff)
compiler quietening
-rw-r--r--src/src/acl.c10
-rw-r--r--src/src/deliver.c24
-rw-r--r--src/src/expand.c11
-rw-r--r--src/src/readconf.c4
-rw-r--r--src/src/store.c2
-rw-r--r--src/src/tls-openssl.c2
6 files changed, 27 insertions, 26 deletions
diff --git a/src/src/acl.c b/src/src/acl.c
index dac2ba570..c8ad795fe 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -1508,11 +1508,11 @@ typedef struct {
unsigned alt_opt_sep; /* >0 Non-/ option separator (custom parser) */
} verify_type_t;
static verify_type_t verify_type_list[] = {
- /* name value where no-opt opt-sep */
- { US"reverse_host_lookup", VERIFY_REV_HOST_LKUP, ~0, FALSE, 0 },
- { US"certificate", VERIFY_CERT, ~0, TRUE, 0 },
- { US"helo", VERIFY_HELO, ~0, TRUE, 0 },
- { US"csa", VERIFY_CSA, ~0, FALSE, 0 },
+ /* name value where no-opt opt-sep */
+ { US"reverse_host_lookup", VERIFY_REV_HOST_LKUP, (unsigned)~0, FALSE, 0 },
+ { US"certificate", VERIFY_CERT, (unsigned)~0, TRUE, 0 },
+ { US"helo", VERIFY_HELO, (unsigned)~0, TRUE, 0 },
+ { US"csa", VERIFY_CSA, (unsigned)~0, FALSE, 0 },
{ US"header_syntax", VERIFY_HDR_SYNTAX, ACL_BIT_DATA | ACL_BIT_NOTSMTP, TRUE, 0 },
{ US"not_blind", VERIFY_NOT_BLIND, ACL_BIT_DATA | ACL_BIT_NOTSMTP, FALSE, 0 },
{ US"header_sender", VERIFY_HDR_SNDR, ACL_BIT_DATA | ACL_BIT_NOTSMTP, FALSE, 0 },
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 05494dd8b..66e49d371 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -107,21 +107,21 @@ Returns: the amount of bytes read
static ssize_t
readn(int fd, void * buffer, size_t len)
{
- void * next = buffer;
- void * end = buffer + len;
+uschar * next = buffer;
+uschar * end = next + len;
- while (next < end)
- {
- ssize_t got = read(fd, next, end - next);
+while (next < end)
+ {
+ ssize_t got = read(fd, next, end - next);
- /* I'm not sure if there are signals that can interrupt us,
- for now I assume the worst */
- if (got == -1 && errno == EINTR) continue;
- if (got <= 0) return next - buffer;
- next += got;
- }
+ /* I'm not sure if there are signals that can interrupt us,
+ for now I assume the worst */
+ if (got == -1 && errno == EINTR) continue;
+ if (got <= 0) return next - US buffer;
+ next += got;
+ }
- return len;
+return len;
}
diff --git a/src/src/expand.c b/src/src/expand.c
index 1bfc75d2b..205ac33f0 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -451,6 +451,7 @@ typedef struct {
} alblock;
static uschar * fn_recipients(void);
+typedef uschar * stringptr_fn_t(void);
/* This table must be kept in alphabetical order. */
@@ -472,7 +473,7 @@ static var_entry var_table[] = {
{ "address_file", vtype_stringptr, &address_file },
{ "address_pipe", vtype_stringptr, &address_pipe },
#ifdef EXPERIMENTAL_ARC
- { "arc_domains", vtype_string_func, &fn_arc_domains },
+ { "arc_domains", vtype_string_func, (void *) &fn_arc_domains },
{ "arc_oldest_pass", vtype_int, &arc_oldest_pass },
{ "arc_state", vtype_stringptr, &arc_state },
{ "arc_state_reason", vtype_stringptr, &arc_state_reason },
@@ -553,7 +554,7 @@ static var_entry var_table[] = {
{ "exim_path", vtype_stringptr, &exim_path },
{ "exim_uid", vtype_uid, &exim_uid },
{ "exim_version", vtype_stringptr, &version_string },
- { "headers_added", vtype_string_func, &fn_hdrs_added },
+ { "headers_added", vtype_string_func, (void *) &fn_hdrs_added },
{ "home", vtype_stringptr, &deliver_home },
{ "host", vtype_stringptr, &deliver_host },
{ "host_address", vtype_stringptr, &deliver_host_address },
@@ -664,7 +665,7 @@ static var_entry var_table[] = {
{ "received_time", vtype_int, &received_time.tv_sec },
{ "recipient_data", vtype_stringptr, &recipient_data },
{ "recipient_verify_failure",vtype_stringptr,&recipient_verify_failure },
- { "recipients", vtype_string_func, &fn_recipients },
+ { "recipients", vtype_string_func, (void *) &fn_recipients },
{ "recipients_count", vtype_int, &recipients_count },
#ifdef WITH_CONTENT_SCAN
{ "regex_match_string", vtype_stringptr, &regex_match_string },
@@ -699,7 +700,7 @@ static var_entry var_table[] = {
{ "smtp_active_hostname", vtype_stringptr, &smtp_active_hostname },
{ "smtp_command", vtype_stringptr, &smtp_cmd_buffer },
{ "smtp_command_argument", vtype_stringptr, &smtp_cmd_argument },
- { "smtp_command_history", vtype_string_func, &smtp_cmd_hist },
+ { "smtp_command_history", vtype_string_func, (void *) &smtp_cmd_hist },
{ "smtp_count_at_connection_start", vtype_int, &smtp_accept_count },
{ "smtp_notquit_reason", vtype_stringptr, &smtp_notquit_reason },
{ "sn0", vtype_filter_int, &filter_sn[0] },
@@ -1961,7 +1962,7 @@ switch (vp->type)
case vtype_string_func:
{
- uschar * (*fn)() = val;
+ stringptr_fn_t * fn = (stringptr_fn_t *) val;
return fn();
}
diff --git a/src/src/readconf.c b/src/src/readconf.c
index f55c1da34..a5482f72d 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -306,7 +306,7 @@ static optionlist optionlist_config[] = {
{ "smtp_ratelimit_hosts", opt_stringptr, &smtp_ratelimit_hosts },
{ "smtp_ratelimit_mail", opt_stringptr, &smtp_ratelimit_mail },
{ "smtp_ratelimit_rcpt", opt_stringptr, &smtp_ratelimit_rcpt },
- { "smtp_receive_timeout", opt_func, &fn_smtp_receive_timeout },
+ { "smtp_receive_timeout", opt_func, (void *) &fn_smtp_receive_timeout },
{ "smtp_reserve_hosts", opt_stringptr, &smtp_reserve_hosts },
{ "smtp_return_error_details",opt_bool, &smtp_return_error_details },
#ifdef SUPPORT_I18N
@@ -3350,7 +3350,7 @@ syscalls). It also assume we're on the relevant pool. */
if (statbuf.st_size > 8192)
{
rmark r = store_mark();
- store_get((int)statbuf.st_size, FALSE);
+ void * dummy = store_get((int)statbuf.st_size, FALSE);
store_reset(r);
}
diff --git a/src/src/store.c b/src/src/store.c
index 049c988be..a06e1c19a 100644
--- a/src/src/store.c
+++ b/src/src/store.c
@@ -788,7 +788,7 @@ if (!(yield = mmap(NULL, (size_t)size,
"called from line %d of %s", size, line, func);
if (yield < tainted_base) tainted_base = yield;
-if ((top = yield + size) > tainted_top) tainted_top = top;
+if ((top = US yield + size) > tainted_top) tainted_top = top;
return store_alloc_tail(yield, size, func, line, US"Mmap");
}
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index e219f5cc1..d6867200c 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -148,7 +148,7 @@ Plus SSL_OP_NO_TLSv1_3 for 1.1.2-dev
static exim_openssl_option exim_openssl_options[] = {
/* KEEP SORTED ALPHABETICALLY! */
#ifdef SSL_OP_ALL
- { US"all", SSL_OP_ALL },
+ { US"all", (long) SSL_OP_ALL },
#endif
#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
{ US"allow_unsafe_legacy_renegotiation", SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION },