On Thu, Nov 28, 2019 at 08:14:53AM +0100, Thomas Huth wrote: > Commit c09c54c66b1df ("lib: use an argument which doesn't require > default argument promotion") fixed a warning that occurs with Clang, > but introduced a regression: If the "pass" parameter is a value > which has only set the condition bits in the upper 32 bits of a > 64 bit value, the condition is now false since the value is truncated > to "unsigned int" so that the upper bits are simply discarded. > > We fixed it by reverting the commit, but that of course also means > trouble with Clang again. We can not use "bool" if it is the last > parameter before the variable argument list. The proper fix is to > swap the parameters around and make the format string the last > parameter. > > This patch (except the changes in lib/libcflat.h and lib/report.c > and some rebase conflicts along the way) has basically been created > with following coccinelle script (with some additional manual tweaking > of long and disabled lines afterwards): > > @@ > 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); > > Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx> > --- > v2: Rebase the patch to the current master branch > Tested on arm and arm64. Tested-by: Andrew Jones <drjones@xxxxxxxxxx> Thanks, drew _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm