Skip to contentSkip to conversation

Revert "lib: use an argument which doesn't require default argument promotion"

PATCH New Paolo Bonzini 1 participant 1 message Oct 23, 2019

Subsystems (2)
lore
Share & tools
lore

Paolo Bonzini

author maintainer
#0 lore raw

PATCH 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.

---
 lib/libcflat.h | 4 ++--
 lib/report.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
lib/libcflat.h +2 -2
index b6635d9..b94d0ac 100644
@@ -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
index 2a5f549..ca9b4fd 100644
@@ -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