compiler quietening
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 3 Aug 2019 15:42:19 +0000 (16:42 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 3 Aug 2019 15:42:19 +0000 (16:42 +0100)
src/src/acl.c
src/src/deliver.c
src/src/expand.c
src/src/readconf.c
src/src/store.c
src/src/tls-openssl.c

index dac2ba570cdeba68efac738be2acb632837ae936..c8ad795fee834bc4ce95ae17ff922aaaf616d7f0 100644 (file)
@@ -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 },
index 05494dd8b74b52eb3c04d0e7eeb110e6d403aa18..66e49d3712297f57489b3844ce82b73b1ab45bc8 100644 (file)
@@ -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;
 }
 
 
index 1bfc75d2b6cf1e31cdd36864fe39679e09af92b1..205ac33f09838674f9b215bdda5712dd25be388c 100644 (file)
@@ -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();
     }
 
index f55c1da3479c8bfed64c264e0a5e5f7d47954c86..a5482f72dd1f193d2fdb90cd2e67dad081750cca 100644 (file)
@@ -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);
   }
 
index 049c988bed85f37d2c3867130f50a9fb9492a35a..a06e1c19afd1035a804d005cf0b9ff7142d0b562 100644 (file)
@@ -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");
 }
index e219f5cc15f19a56f1864d1c6ef44ade8116c36b..d6867200c9e6cdd2810b364186c329cdbb4a1895 100644 (file)
@@ -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 },