Message ID | 20220422070144.1043697-3-sw@weilnetz.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | libvhost-user: Add format attribute and fix format strings | expand |
On Fri, Apr 22, 2022 at 11:07 AM Stefan Weil <sw@weilnetz.de> wrote: > Signed-off-by: Stefan Weil <sw@weilnetz.de> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > 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 > > >
Le 22/04/2022 à 09:01, Stefan Weil a écrit : > Signed-off-by: Stefan Weil <sw@weilnetz.de> > --- > 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
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; }
Signed-off-by: Stefan Weil <sw@weilnetz.de> --- subprojects/libvhost-user/libvhost-user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)