Gerd Hoffmann wrote: > On 07/02/09 01:40, Robert Reif wrote: >> This patch fixes 2 compile errors when debugging is enabled. >> >> CC scsi-disk.o >> cc1: warnings being treated as errors >> /home/reif/qemu/hw/scsi-disk.c: In function ‘scsi_send_command’: >> /home/reif/qemu/hw/scsi-disk.c:797: error: format ‘%d’ expects type >> ‘int’, but argument 2 has type ‘uint64_t’ > > > - DPRINTF("Synchronise cache (sector %d, count %d)\n", lba, > len); > > + DPRINTF("Synchronise cache (sector %lld, count %d)\n", lba, > len); > > Doesn't work. Well, it works on 32bit, but will fail on 64bit. Use > the macros provided by inttypes.h instead, i.e. > > "... (sector %" PRId64 ", count ...", lba > > Here is a revised patch that uses PRIu64 because lba is a uint64_t. This patch fixes the 2 %d that were giving an error and 2 %lld that were wrong.