qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kaige Li <likaige@loongson.cn>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 1/2] virtio-mem: Change PRIx32 to PRIXPTR to fix compile error.
Date: Fri, 31 Jul 2020 11:52:02 +0800	[thread overview]
Message-ID: <10b4681c-a129-3735-0395-7439b7d48742@loongson.cn> (raw)
In-Reply-To: <601c098c-0f39-92be-8800-99f5fe99399f@redhat.com>



On 07/30/2020 09:15 PM, Philippe Mathieu-Daudé wrote:
> On 7/30/20 1:57 PM, Kaige Li wrote:
>> When I compile qemu with such as:
>>
>> git clone https://git.qemu.org/git/qemu.git
>> cd qemu
>> git submodule init
>> git submodule update --recursive
>> ./configure
>> make
> ^ this timeless description is pointless (think at a developer
> who read this in 2 weeks, 3 months, 1 year).
Thanks for your suggestions, I will delete it.
>
>> There is error log:
>>
>> /home/LiKaige/qemu/hw/virtio/virtio-mem.c: In function ‘virtio_mem_set_block_size’:
>> /home/LiKaige/qemu/hw/virtio/virtio-mem.c:756:9: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘uintptr_t’ [-Werror=format=]
> What compiler are you using? That is the relevant information to
> include.
Gcc version is 4.9.4.
>
>>           error_setg(errp, "'%s' property has to be at least 0x%" PRIx32, name,
>>           ^
>> cc1: all warnings being treated as errors
>> /home/LiKaige/qemu/rules.mak:69: recipe for target 'hw/virtio/virtio-mem.o' failed
>>
>> So, change PRIx32 to PRIXPTR to fix this.
>>
>> Signed-off-by: Kaige Li <likaige@loongson.cn>
>> ---
>>   hw/virtio/virtio-mem.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
>> index c12e9f7..3dcaf9a 100644
>> --- a/hw/virtio/virtio-mem.c
>> +++ b/hw/virtio/virtio-mem.c
>> @@ -753,7 +753,7 @@ static void virtio_mem_set_block_size(Object *obj, Visitor *v, const char *name,
>>       }
>>   
>>       if (value < VIRTIO_MEM_MIN_BLOCK_SIZE) {
>> -        error_setg(errp, "'%s' property has to be at least 0x%" PRIx32, name,
>> +        error_setg(errp, "'%s' property has to be at least 0x%" PRIXPTR "\n", name,
>>                      VIRTIO_MEM_MIN_BLOCK_SIZE);
>>           return;
>>       } else if (!is_power_of_2(value)) {
>>



      reply	other threads:[~2020-07-31  3:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 11:57 [PATCH v2 1/2] virtio-mem: Change PRIx32 to PRIXPTR to fix compile error Kaige Li
2020-07-30 11:57 ` [PATCH v2 2/2] target/arm: Fix " Kaige Li
2020-07-30 13:17   ` Philippe Mathieu-Daudé
2020-07-30 20:47     ` Peter Maydell
2020-07-30 20:45   ` Peter Maydell
2020-07-31  1:26     ` Kaige Li
2020-07-30 12:03 ` [PATCH v2 1/2] virtio-mem: Change PRIx32 to PRIXPTR to fix " David Hildenbrand
2020-07-30 12:57   ` David Hildenbrand
2020-07-30 13:15 ` Philippe Mathieu-Daudé
2020-07-31  3:52   ` Kaige Li [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=10b4681c-a129-3735-0395-7439b7d48742@loongson.cn \
    --to=likaige@loongson.cn \
    --cc=david@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).