[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors |
Date: |
Thu, 2 Jul 2009 09:53:31 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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
Given the error, PRIu64 looks better.
-- Jamie