From 798b7ff1c0f7e155ccb3a1fa9bbcc69f750bafd9 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 28 Sep 2022 14:33:13 +1000 Subject: clang-tidy: Suppress warning about unchecked error in logfn macro 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 Signed-off-by: Stefano Brivio --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util.c') 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"); \ -- cgit v1.2.3