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:
parent
84fec4e998
commit
798b7ff1c0
1 changed files with 1 additions and 1 deletions
2
util.c
2
util.c
|
@ -57,7 +57,7 @@ void name(const char *format, ...) { \
|
||||||
if (setlogmask(0) & LOG_MASK(LOG_DEBUG) || \
|
if (setlogmask(0) & LOG_MASK(LOG_DEBUG) || \
|
||||||
setlogmask(0) == LOG_MASK(LOG_EMERG)) { \
|
setlogmask(0) == LOG_MASK(LOG_EMERG)) { \
|
||||||
va_start(args, format); \
|
va_start(args, format); \
|
||||||
vfprintf(stderr, format, args); \
|
(void)vfprintf(stderr, format, args); \
|
||||||
va_end(args); \
|
va_end(args); \
|
||||||
if (format[strlen(format)] != '\n') \
|
if (format[strlen(format)] != '\n') \
|
||||||
fprintf(stderr, "\n"); \
|
fprintf(stderr, "\n"); \
|
||||||
|
|
Loading…
Reference in a new issue