This reverts commit c09c54c66b1df63cd11a75859cf53527d1c6e959. The s390x selftest, for example, passes a uintptr_t whose nonzero bits are all above bit 31. Therefore, the argument is truncated to zero if it is unsigned rather than bool. Reported-by: Thomas Huth <thuth@xxxxxxxxxx> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> --- lib/libcflat.h | 4 ++-- lib/report.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index b6635d9..b94d0ac 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -99,9 +99,9 @@ void report_prefix_pushf(const char *prefix_fmt, ...) __attribute__((format(printf, 1, 2))); extern void report_prefix_push(const char *prefix); extern void report_prefix_pop(void); -extern void report(const char *msg_fmt, unsigned pass, ...) +extern void report(const char *msg_fmt, bool pass, ...) __attribute__((format(printf, 1, 3))); -extern void report_xfail(const char *msg_fmt, bool xfail, unsigned pass, ...) +extern void report_xfail(const char *msg_fmt, bool xfail, bool pass, ...) __attribute__((format(printf, 1, 4))); extern void report_abort(const char *msg_fmt, ...) __attribute__((format(printf, 1, 2))) diff --git a/lib/report.c b/lib/report.c index 2a5f549..ca9b4fd 100644 --- a/lib/report.c +++ b/lib/report.c @@ -104,7 +104,7 @@ static void va_report(const char *msg_fmt, spin_unlock(&lock); } -void report(const char *msg_fmt, unsigned pass, ...) +void report(const char *msg_fmt, bool pass, ...) { va_list va; va_start(va, pass); @@ -112,7 +112,7 @@ void report(const char *msg_fmt, unsigned pass, ...) va_end(va); } -void report_xfail(const char *msg_fmt, bool xfail, unsigned pass, ...) +void report_xfail(const char *msg_fmt, bool xfail, bool pass, ...) { va_list va; va_start(va, pass); -- 2.21.0