From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: [PATCH 02/28] clang-tidy: Suppress warning about unchecked error in logfn macro Date: Wed, 28 Sep 2022 14:33:13 +1000 Message-ID: <20220928043339.613538-3-david@gibson.dropbear.id.au> In-Reply-To: <20220928043339.613538-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4500113799895669954==" --===============4500113799895669954== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit clang-tidy complains that we're not checking the result of vfprintf in logfn(). There's not really anything we can do if this fails here, so just suppress the error with a cast to void. Signed-off-by: David Gibson --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 8d26561..6b86ead 100644 --- a/util.c +++ b/util.c @@ -57,7 +57,7 @@ void name(const char *format, ...) { \ if (setlogmask(0) & LOG_MASK(LOG_DEBUG) || \ setlogmask(0) == LOG_MASK(LOG_EMERG)) { \ va_start(args, format); \ - vfprintf(stderr, format, args); \ + (void)vfprintf(stderr, format, args); \ va_end(args); \ if (format[strlen(format)] != '\n') \ fprintf(stderr, "\n"); \ -- 2.37.3 --===============4500113799895669954==--