From fd77dd20e2d0c0c08c95429422612930e1c58207 Mon Sep 17 00:00:00 2001 From: gilles Date: Sat, 19 Apr 2014 17:36:54 +0000 Subject: [PATCH] (void) cast snprintf() calls that cannot truncate (and would be harmless otherwise) --- usr.sbin/smtpd/ioev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/smtpd/ioev.c b/usr.sbin/smtpd/ioev.c index eddaaf58e85..c1d6736cb8b 100644 --- a/usr.sbin/smtpd/ioev.c +++ b/usr.sbin/smtpd/ioev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioev.c,v 1.17 2014/04/19 12:48:54 gilles Exp $ */ +/* $OpenBSD: ioev.c,v 1.18 2014/04/19 17:36:54 gilles Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -88,7 +88,7 @@ io_strio(struct io *io) ssl[0] = '\0'; #ifdef IO_SSL if (io->ssl) { - snprintf(ssl, sizeof ssl, " ssl=%s:%s:%d", + (void)snprintf(ssl, sizeof ssl, " ssl=%s:%s:%d", SSL_get_cipher_version(io->ssl), SSL_get_cipher_name(io->ssl), SSL_get_cipher_bits(io->ssl, NULL)); @@ -96,11 +96,11 @@ io_strio(struct io *io) #endif if (io->iobuf == NULL) - snprintf(buf, sizeof buf, + (void)snprintf(buf, sizeof buf, "", io, io->sock, io->timeout, io_strflags(io->flags), ssl); else - snprintf(buf, sizeof buf, + (void)snprintf(buf, sizeof buf, "", io, io->sock, io->timeout, io_strflags(io->flags), ssl, io_pending(io), io_queued(io)); @@ -125,7 +125,7 @@ io_strevent(int evt) CASE(IO_TIMEOUT); CASE(IO_ERROR); default: - snprintf(buf, sizeof(buf), "IO_? %d", evt); + (void)snprintf(buf, sizeof(buf), "IO_? %d", evt); return buf; } } -- 2.20.1