On 14/10/2019 13.04, Paolo Bonzini wrote: > On 14/10/19 09:57, Thomas Huth wrote: >> -void report(const char *msg_fmt, bool pass, ...) >> +void report(bool pass, const char *msg_fmt, ...) >> { >> va_list va; >> - va_start(va, pass); >> + va_start(va, msg_fmt); >> va_report(msg_fmt, pass, false, false, va); >> va_end(va); >> } >> >> -void report_xfail(const char *msg_fmt, bool xfail, bool pass, ...) >> +void report_xfail(bool xfail, bool pass, const char *msg_fmt, ...) >> { >> va_list va; >> - va_start(va, pass); >> + va_start(va, msg_fmt); >> va_report(msg_fmt, pass, xfail, false, va); >> va_end(va); >> } >> >> ... then we can keep the "bool" - but we have to fix all calling sites, too. >> >> Paolo, any preferences? > > Actually I had already pushed Bill's patch. I also thought about > reordering the arguments, but it's a big change. If someone wants to > try his hands at doing it with Coccinelle, I'm happy to apply it. This coccinelle script seems to do the job: @@ expression fmt; expression pass; expression list args; @@ report( -fmt, pass +pass, fmt , args); @@ expression fmt; expression pass; expression list args; @@ report_xfail( -fmt, xfail, pass +xfail, pass, fmt , args); I'll try to cook a patch with that. Thomas