1
0
mirror of https://passt.top/passt synced 2024-06-27 21:42:42 +00:00

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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson 2022-09-28 14:33:13 +10:00 committed by Stefano Brivio
parent 84fec4e998
commit 798b7ff1c0

2
util.c
View File

@ -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"); \