qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors
Date: Thu, 09 Jul 2009 14:16:55 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Robert Reif wrote:
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.

Need to resend as a top level patch and included a SoB.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]