Re: [PATCH 2/3] libvhost-user: Fix format strings

2022-11-02 Thread Laurent Vivier

Le 22/04/2022 à 09:01, Stefan Weil a écrit :

Signed-off-by: Stefan Weil 
---
  subprojects/libvhost-user/libvhost-user.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subprojects/libvhost-user/libvhost-user.c 
b/subprojects/libvhost-user/libvhost-user.c
index 2d29140a8f..94645f9154 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -700,7 +700,7 @@ vu_add_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
  if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
  close(vmsg->fds[0]);
  vu_panic(dev, "VHOST_USER_ADD_MEM_REG requires a message size of at "
-  "least %d bytes and only %d bytes were received",
+  "least %zu bytes and only %d bytes were received",
VHOST_USER_MEM_REG_SIZE, vmsg->size);
  return false;
  }
@@ -833,7 +833,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
  if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
  close(vmsg->fds[0]);
  vu_panic(dev, "VHOST_USER_REM_MEM_REG requires a message size of at "
-  "least %d bytes and only %d bytes were received",
+  "least %zu bytes and only %d bytes were received",
VHOST_USER_MEM_REG_SIZE, vmsg->size);
  return false;
  }


Applied to my trivial-patches branch.

Thanks,
Laurent




Re: [PATCH 2/3] libvhost-user: Fix format strings

2022-04-22 Thread Marc-André Lureau
On Fri, Apr 22, 2022 at 11:07 AM Stefan Weil  wrote:

> Signed-off-by: Stefan Weil 
>

Reviewed-by: Marc-André Lureau 


> ---
>  subprojects/libvhost-user/libvhost-user.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/subprojects/libvhost-user/libvhost-user.c
> b/subprojects/libvhost-user/libvhost-user.c
> index 2d29140a8f..94645f9154 100644
> --- a/subprojects/libvhost-user/libvhost-user.c
> +++ b/subprojects/libvhost-user/libvhost-user.c
> @@ -700,7 +700,7 @@ vu_add_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
>  if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
>  close(vmsg->fds[0]);
>  vu_panic(dev, "VHOST_USER_ADD_MEM_REG requires a message size of
> at "
> -  "least %d bytes and only %d bytes were received",
> +  "least %zu bytes and only %d bytes were received",
>VHOST_USER_MEM_REG_SIZE, vmsg->size);
>  return false;
>  }
> @@ -833,7 +833,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
>  if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
>  close(vmsg->fds[0]);
>  vu_panic(dev, "VHOST_USER_REM_MEM_REG requires a message size of
> at "
> -  "least %d bytes and only %d bytes were received",
> +  "least %zu bytes and only %d bytes were received",
>VHOST_USER_MEM_REG_SIZE, vmsg->size);
>  return false;
>  }
> --
> 2.30.2
>
>
>

-- 
Marc-André Lureau


[PATCH 2/3] libvhost-user: Fix format strings

2022-04-22 Thread Stefan Weil
Signed-off-by: Stefan Weil 
---
 subprojects/libvhost-user/libvhost-user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subprojects/libvhost-user/libvhost-user.c 
b/subprojects/libvhost-user/libvhost-user.c
index 2d29140a8f..94645f9154 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -700,7 +700,7 @@ vu_add_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
 if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
 close(vmsg->fds[0]);
 vu_panic(dev, "VHOST_USER_ADD_MEM_REG requires a message size of at "
-  "least %d bytes and only %d bytes were received",
+  "least %zu bytes and only %d bytes were received",
   VHOST_USER_MEM_REG_SIZE, vmsg->size);
 return false;
 }
@@ -833,7 +833,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
 if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
 close(vmsg->fds[0]);
 vu_panic(dev, "VHOST_USER_REM_MEM_REG requires a message size of at "
-  "least %d bytes and only %d bytes were received",
+  "least %zu bytes and only %d bytes were received",
   VHOST_USER_MEM_REG_SIZE, vmsg->size);
 return false;
 }
-- 
2.30.2