summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-05-14 12:41:25 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-05-22 07:16:17 +0200
commit7fa9f0388ca7270ae4267f305a2fa384c4252170 (patch)
tree09daa780a5c657ac4eed69edb25262a3d0a3ea36
parent1005810b8ae92e0110aae123ee0a91b0a6717343 (diff)
downloadfocaccia-qemu-7fa9f0388ca7270ae4267f305a2fa384c4252170.tar.gz
focaccia-qemu-7fa9f0388ca7270ae4267f305a2fa384c4252170.zip
libvhost-user: fix -Werror=format= on ppc64
That should fix the following warning:

/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function
‘vu_set_mem_table_exec_postcopy’:
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but
argument 5 has type ‘__u64’ [-Werror=format=]
         DPRINT("%s: region %d: Registered userfault for %llx + %llx\n",
         ^
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but
argument 6 has type ‘__u64’ [-Werror=format=]
cc1: all warnings being treated as errors

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190514104126.6294-3-marcandre.lureau@redhat.com

{ kraxel: s/PRIu64/PRIx64/ ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--contrib/libvhost-user/libvhost-user.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
index 0ffa0f45c8..c56f2dfe44 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -663,8 +663,10 @@ vu_set_mem_table_exec_postcopy(VuDev *dev, VhostUserMsg *vmsg)
                      __func__, i);
             return false;
         }
-        DPRINT("%s: region %d: Registered userfault for %llx + %llx\n",
-                __func__, i, reg_struct.range.start, reg_struct.range.len);
+        DPRINT("%s: region %d: Registered userfault for %"
+               PRIx64 " + %" PRIx64 "\n", __func__, i,
+               (uint64_t)reg_struct.range.start,
+               (uint64_t)reg_struct.range.len);
         /* Now it's registered we can let the client at it */
         if (mprotect((void *)(uintptr_t)dev_region->mmap_addr,
                      dev_region->size + dev_region->mmap_offset,