Revert "lib: use an argument which doesn't require default argument promotion"
Subsystems (2)
Paolo Bonzini
maintainerPATCH 1/1 Revert "lib: use an argument which doesn't require default argument promotion"
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 <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- lib/libcflat.h | 4 ++-- lib/report.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
lib/libcflat.h +2 -2
@@ -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 )))
lib/report.c +2 -2
@@ -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);
Signature · 1 line
2.21.0