From: schwarze Date: Sun, 20 Apr 2014 22:03:40 +0000 (+0000) Subject: in debug messages, truncating strings of excessive lengths is actually X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b5e65a851b785064d8f024c6b25a33e508e12744;p=openbsd 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/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index 97e1d067b23..9562593e680 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.25 2014/04/20 16:44:44 schwarze Exp $ */ +/* $Id: read.c,v 1.26 2014/04/20 22:03:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -827,7 +827,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);