From fec6caaad4925c4be42fa52ba1b59d904dc0d0c9 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Wed, 15 Mar 2017 00:24:02 +0000 Subject: [PATCH] build: fix minor code warnings / style - remove an unnecessary backslash - put variable in same preprocessor scope - move prototype to where it's needed --- imap/imap.c | 4 ++-- mbyte.c | 4 ++++ mutt_ssl.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/imap/imap.c b/imap/imap.c index a6632e2b4..d4dd2f35c 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -708,8 +708,8 @@ static int imap_open_mailbox (CONTEXT* ctx) goto fail; /* check for READ-ONLY notification */ - if (!ascii_strncasecmp (imap_get_qualifier (idata->buf), "[READ-ONLY]", 11) \ - && !mutt_bit_isset (idata->capabilities, ACL)) + if (!ascii_strncasecmp(imap_get_qualifier(idata->buf), "[READ-ONLY]", 11) && + !mutt_bit_isset(idata->capabilities, ACL)) { mutt_debug (2, "Mailbox is read-only.\n"); ctx->readonly = 1; diff --git a/mbyte.c b/mbyte.c index 6ca4a0212..c08185f60 100644 --- a/mbyte.c +++ b/mbyte.c @@ -42,6 +42,10 @@ static iconv_t charset_to_utf8 = (iconv_t)(-1); static iconv_t charset_from_utf8 = (iconv_t)(-1); #endif +#ifndef HAVE_WC_FUNCS +static size_t utf8rtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *_ps); +#endif + void mutt_set_charset (char *charset) { char buffer[STRING]; diff --git a/mutt_ssl.c b/mutt_ssl.c index 1115528e1..862d473c3 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -103,8 +103,10 @@ static int ssl_load_certificates (SSL_CTX *ctx) FILE *fp; X509 *cert = NULL; X509_STORE *store; - char buf[STRING]; int rv = 1; +#ifdef DEBUG + char buf[STRING]; +#endif mutt_debug (2, "ssl_load_certificates: loading trusted certificates\n"); store = SSL_CTX_get_cert_store (ctx); -- 2.50.0