From: Ingo Schwarze Date: Sun, 20 Apr 2014 22:04:04 +0000 (+0000) Subject: in debug messages, truncating strings of excessive lengths is actually X-Git-Tag: VERSION_1_13_1~169 X-Git-Url: https://git.cameronkatri.com/mandoc.git/commitdiff_plain/2cda3c176360e39d41c057136d83a3deac799b17?ds=inline in debug messages, truncating strings of excessive lengths is actually a good thing, so cast the return value from sprintf to (void); this concludes the mandoc sprintf audit --- diff --git a/read.c b/read.c index 1548c9a0..959da529 100644 --- a/read.c +++ b/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.47 2014/04/20 16:46:05 schwarze Exp $ */ +/* $Id: read.c,v 1.48 2014/04/20 22:04:04 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -852,7 +852,7 @@ mandoc_vmsg(enum mandocerr t, struct mparse *m, va_list ap; va_start(ap, fmt); - vsnprintf(buf, sizeof(buf) - 1, fmt, ap); + (void)vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); mandoc_msg(t, m, ln, pos, buf);