From: Anthony Liguori <anthony@codemonkey.ws>
To: Robert Reif <reif@earthlink.net>
Cc: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors
Date: Thu, 09 Jul 2009 14:16:55 -0500 [thread overview]
Message-ID: <4A564227.90904@codemonkey.ws> (raw)
In-Reply-To: <4A4C94CF.1080002@earthlink.net>
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
prev parent reply other threads:[~2009-07-09 19:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 23:40 [Qemu-devel] [PATCH] fix hw/scsi-disk.c compile errors Robert Reif
2009-07-02 6:46 ` Gerd Hoffmann
2009-07-02 8:53 ` Jamie Lokier
2009-07-02 11:06 ` Robert Reif
2009-07-09 19:16 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A564227.90904@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=reif@earthlink.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).