From 5882fa0ffdfd3c74a320281e94d271a1da2f4838 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 20 Apr 2014 22:04:04 +0000 Subject: 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 --- read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'read.c') diff --git a/read.c b/read.c index 3fe826aa..67209f8d 100644 --- a/read.c +++ b/read.c @@ -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); -- cgit