From faf35eb053fa84fb951e2b84b33b904f4ff47d8c Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 25 Sep 2017 02:02:37 +0100 Subject: [PATCH] build: expand buffers to avoid gcc7 warnings --- account.c | 4 ++-- bcache.c | 2 +- help.c | 2 +- nntp.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/account.c b/account.c index ed82ed7fb..97671278a 100644 --- a/account.c +++ b/account.c @@ -176,7 +176,7 @@ void mutt_account_tourl(struct Account *account, struct Url *url) */ int mutt_account_getuser(struct Account *account) { - char prompt[SHORT_STRING]; + char prompt[STRING]; /* already set */ if (account->flags & MUTT_ACCT_USER) @@ -242,7 +242,7 @@ int mutt_account_getlogin(struct Account *account) */ int mutt_account_getpass(struct Account *account) { - char prompt[SHORT_STRING]; + char prompt[STRING]; if (account->flags & MUTT_ACCT_PASS) return 0; diff --git a/bcache.c b/bcache.c index 2699c8206..c28e9eb1f 100644 --- a/bcache.c +++ b/bcache.c @@ -152,7 +152,7 @@ FILE *mutt_bcache_get(struct BodyCache *bcache, const char *id) FILE *mutt_bcache_put(struct BodyCache *bcache, const char *id, int tmp) { - char path[_POSIX_PATH_MAX]; + char path[LONG_STRING]; struct stat sb; if (!id || !*id || !bcache) diff --git a/help.c b/help.c index 7686e08ec..0ba4e9a5b 100644 --- a/help.c +++ b/help.c @@ -196,7 +196,7 @@ static int get_wrapped_width(const char *t, size_t wid) static int pad(FILE *f, int col, int i) { - char fmt[8]; + char fmt[32] = ""; if (col < i) { diff --git a/nntp.c b/nntp.c index 36fcb67ae..725b6340b 100644 --- a/nntp.c +++ b/nntp.c @@ -2183,7 +2183,7 @@ static int nntp_date(struct NntpServer *nserv, time_t *now) int nntp_active_fetch(struct NntpServer *nserv, unsigned int new) { struct NntpData nntp_data; - char msg[SHORT_STRING]; + char msg[STRING]; char buf[LONG_STRING]; unsigned int i; int rc; -- 2.40.0