On Tue, 26 Aug 2025 at 12:16, Daniel P. Berrangé <berra...@redhat.com> wrote: > > On Mon, Aug 25, 2025 at 03:24:01PM +0800, Zhao Liu wrote: > > > - DPRINTF("read addr 0x%02x, %d bytes, content 0x%02lx\n", > > > - (int)addr, size, (long unsigned int)temp); > > > > tmep is "uint64_t", so there's no need to convert its type? > > We can't assume 'uint64_t' is a match for '%lx' - the > format string can be changed to PRIx64 though which > would let us drop the cast.
Yes, we have quite a few uses of casts in printfs which are really only there because the standard way to print a uint64_t is so awkward and ugly... -- PMM