Re: [PATCH 1/9] Report bugs consistently
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 29, 2016, 15:11 UTC
- Message-ID
- <alpine.DEB.2.20.1606291709270.12947@virtualbox>
- In-Reply-To
- <8615dc276828a3f99a27ff2eda9909548a7d435e.1467199553.git.johannes.schindelin@gmx.de>
Hi,
On Wed, 29 Jun 2016, Johannes Schindelin wrote:
Show 13 quoted lines
> diff --git a/imap-send.c b/imap-send.c
> index 938c691..cd39805 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -511,7 +511,7 @@ static int nfsnprintf(char *buf, int blen, const char *fmt, ...)
>
> va_start(va, fmt);
> if (blen <= 0 || (unsigned)(ret = vsnprintf(buf, blen, fmt, va)) >= (unsigned)blen)
> - die("Fatal: buffer too small. Please report a bug.");
> + die("BUG: buffer too small (%d < %d)", ret, blen);
> va_end(va);
> return ret;
> }Oy vey. Travis CI found a bug here, thanks to clang's quite smart checking. This here fixup is needed (will make that part of v2, but wait for comments):
-- snipsnap -- From: Johannes Schindelin <johannes.schindelin@gmx.de> Subject: [PATCH] fixup! Report bugs consistently
--- imap-send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/imap-send.c b/imap-send.c index cd39805..369f72a 100644 --- a/imap-send.c +++ b/imap-send.c @@ -506,7 +506,7 @@ static char *next_arg(char **s) static int nfsnprintf(char *buf, int blen, const char *fmt, ...) { - int ret; + int ret = -1; va_list va; va_start(va, fmt);
-- 2.9.0.270.g810e421