qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] virtio-mem: Change PRIx32 to PRIXPTR to fix compile error.
@ 2020-07-30 11:57 Kaige Li
  2020-07-30 11:57 ` [PATCH v2 2/2] target/arm: Fix " Kaige Li
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kaige Li @ 2020-07-30 11:57 UTC (permalink / raw)
  To: Michael S. Tsirkin, David Hildenbrand, Peter Maydell
  Cc: Kaige Li, qemu-arm, qemu-devel

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

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=]
         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)) {
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-31  3:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).