summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/deliver.c2
-rw-r--r--src/src/expand.c14
-rw-r--r--src/src/malware.c12
-rw-r--r--src/src/string.c2
-rw-r--r--src/src/tls-openssl.c1
-rw-r--r--src/src/tlscert-openssl.c10
-rw-r--r--src/src/transport.c1
-rw-r--r--src/src/transports/smtp.c2
8 files changed, 18 insertions, 26 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 851910eb4..3334ba2cb 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -4154,7 +4154,7 @@ for (delivery_count = 0; addr_remote != NULL; delivery_count++)
rmt_dlv_checked_write(fd, big_buffer, ptr - big_buffer);
}
# endif
- #endif /*SUPPORT_TLS
+ #endif /*SUPPORT_TLS*/
if (client_authenticator)
{
diff --git a/src/src/expand.c b/src/src/expand.c
index 01c6e05f4..127134dbc 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -5365,8 +5365,6 @@ while (*s != 0)
#ifdef SUPPORT_TLS
case EITEM_CERTEXTRACT:
{
- int i;
- int field_number = 1;
uschar *save_lookup_value = lookup_value;
uschar *sub[2];
int save_expand_nmax =
@@ -5382,7 +5380,6 @@ while (*s != 0)
/* strip spaces fore & aft */
{
int len;
- int x = 0;
uschar *p = sub[0];
while (isspace(*p)) p++;
@@ -5725,7 +5722,7 @@ while (*s != 0)
int c;
uschar *arg = NULL;
uschar *sub;
- var_entry *vp;
+ var_entry *vp = NULL;
/* Owing to an historical mis-design, an underscore may be part of the
operator name, or it may introduce arguments. We therefore first scan the
@@ -5763,7 +5760,6 @@ while (*s != 0)
break;
}
}
- vp = NULL;
/*FALLTHROUGH*/
#endif
default:
@@ -5861,7 +5857,7 @@ while (*s != 0)
if (vp && *(void **)vp->value)
{
uschar * cp = tls_cert_fprt_md5(*(void **)vp->value);
- yield = string_cat(yield, &size, &ptr, cp, (int)strlen(cp));
+ yield = string_cat(yield, &size, &ptr, cp, Ustrlen(cp));
}
else
#endif
@@ -5882,7 +5878,7 @@ while (*s != 0)
if (vp && *(void **)vp->value)
{
uschar * cp = tls_cert_fprt_sha1(*(void **)vp->value);
- yield = string_cat(yield, &size, &ptr, cp, (int)strlen(cp));
+ yield = string_cat(yield, &size, &ptr, cp, Ustrlen(cp));
}
else
#endif
@@ -6349,7 +6345,7 @@ while (*s != 0)
case EOP_UTF8CLEAN:
{
int seq_len, index = 0;
- int bytes_left = 0;
+ int bytes_left = 0;
uschar seq_buff[4]; /* accumulate utf-8 here */
while (*sub != 0)
@@ -6360,7 +6356,7 @@ while (*s != 0)
complete = 0;
c = *sub++;
- if(bytes_left)
+ if (bytes_left)
{
if ((c & 0xc0) != 0x80)
{
diff --git a/src/src/malware.c b/src/src/malware.c
index aaf3fcb7e..8260a4815 100644
--- a/src/src/malware.c
+++ b/src/src/malware.c
@@ -401,6 +401,7 @@ malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking)
case MC_TCP: sock = m_tcpsocket_fromdef(scanner_options, &errstr); break;
case MC_UNIX: sock = m_unixsocket(scanner_options, &errstr); break;
case MC_STRM: sock = m_streamsocket(scanner_options, &errstr); break;
+ default: /* compiler quietening */ break;
}
if (sock < 0)
return m_errlog_defer(scanent, errstr);
@@ -944,12 +945,10 @@ malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking)
sep = pclose(scanner_out);
signal(SIGCHLD,eximsigchld); signal(SIGPIPE,eximsigpipe);
if (sep != 0)
- if (sep == -1)
return m_errlog_defer(scanent,
- string_sprintf("running scanner failed: %s", strerror(sep)));
- else
- return m_errlog_defer(scanent,
- string_sprintf("scanner returned error code: %d", sep));
+ sep = -1
+ ? string_sprintf("running scanner failed: %s", strerror(sep))
+ : string_sprintf("scanner returned error code: %d", sep));
if (trigger) {
uschar * s;
@@ -1270,8 +1269,7 @@ malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking)
{
free(clamav_fbuf);
return m_errlog_defer_3(scanent,
- string_sprintf("unable to send file body to socket (%s:%u)",
- hostname, port),
+ string_sprintf("unable to send file body to socket (%s)", hostname),
sock);
}
#endif
diff --git a/src/src/string.c b/src/src/string.c
index 365eaec03..7b5245557 100644
--- a/src/src/string.c
+++ b/src/src/string.c
@@ -997,7 +997,7 @@ if (list)
new = string_cat(new, &sz, &off, &sep, 1);
}
-while (sp = Ustrchr(ele, sep))
+while((sp = Ustrchr(ele, sep)))
{
new = string_cat(new, &sz, &off, ele, sp-ele+1);
new = string_cat(new, &sz, &off, &sep, 1);
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 16612d300..db2544c03 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -875,7 +875,6 @@ if(!(bs = OCSP_response_get1_basic(rsp)))
*/
{
BIO * bp = NULL;
- OCSP_CERTID *id;
int status, reason;
ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
diff --git a/src/src/tlscert-openssl.c b/src/src/tlscert-openssl.c
index cddde4cdc..a36ec2ee2 100644
--- a/src/src/tlscert-openssl.c
+++ b/src/src/tlscert-openssl.c
@@ -81,7 +81,7 @@ X509_free((X509 *)cert);
static uschar *
bio_string_copy(BIO * bp, int len)
{
-uschar * cp = "";
+uschar * cp = US"";
len = len > 0 ? (int) BIO_get_mem_data(bp, &cp) : 0;
cp = string_copyn(cp, len);
BIO_free(bp);
@@ -164,7 +164,7 @@ return cp;
uschar *
tls_cert_signature_algorithm(void * cert, uschar * mod)
{
-return string_copy(OBJ_nid2ln(X509_get_signature_type((X509 *)cert)));
+return string_copy(US OBJ_nid2ln(X509_get_signature_type((X509 *)cert)));
}
uschar *
@@ -182,7 +182,7 @@ return string_sprintf("%d", X509_get_version((X509 *)cert));
uschar *
tls_cert_ext_by_oid(void * cert, uschar * oid, int idx)
{
-int nid = OBJ_create(oid, "", "");
+int nid = OBJ_create(CS oid, "", "");
int nidx = X509_get_ext_by_NID((X509 *)cert, nid, idx);
X509_EXTENSION * ex = X509_get_ext((X509 *)cert, nidx);
ASN1_OCTET_STRING * adata = X509_EXTENSION_get_data(ex);
@@ -201,7 +201,7 @@ cp3 = cp2 = store_get(len*3+1);
while(len)
{
- sprintf(cp2, "%.2x ", *cp1++);
+ sprintf(CS cp2, "%.2x ", *cp1++);
cp2 += 3;
len--;
}
@@ -341,7 +341,7 @@ if (!X509_digest(cert,fdig,md,&n))
return NULL;
}
cp = store_get(n*2+1);
-for (j = 0; j < (int)n; j++) sprintf(cp+2*j, "%02X", md[j]);
+for (j = 0; j < (int)n; j++) sprintf(CS cp+2*j, "%02X", md[j]);
return(cp);
}
diff --git a/src/src/transport.c b/src/src/transport.c
index 92de4b92b..00b8fa9d8 100644
--- a/src/src/transport.c
+++ b/src/src/transport.c
@@ -837,7 +837,6 @@ internal_transport_write_message(address_item *addr, int fd, int options,
{
int written = 0;
int len;
-header_line *h;
BOOL use_crlf = (options & topt_use_crlf) != 0;
/* Initialize pointer in output buffer. */
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 1232965b9..fd8948620 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -636,7 +636,7 @@ tpda_defer_errstr = addr->message
? string_sprintf("%s: %s", addr->message, strerror(addr->basic_errno))
: string_copy(addr->message)
: addr->basic_errno > 0
- ? string_copy(strerror(addr->basic_errno))
+ ? string_copy(US strerror(addr->basic_errno))
: NULL;
DEBUG(D_transport)