All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	QEMU <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/3] libvhost-user: fix -Werror=format= on ppc64
Date: Tue, 14 May 2019 14:33:41 +0200	[thread overview]
Message-ID: <CAJ+F1CL3KJpE_+XCXUMyffuCPwUOaqZCzHpxqv2q_BKdQVF_4w@mail.gmail.com> (raw)
In-Reply-To: <36d35842-d872-427b-accf-2d206a6c6b61@redhat.com>

Hi

On Tue, May 14, 2019 at 2:10 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Hi Marc-André,
>
> On 5/14/19 12:41 PM, Marc-André Lureau wrote:
> > 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>
> > ---
> >  contrib/libvhost-user/libvhost-user.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
> > index 40443a3daa..ab85166b15 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 %"
> > +               PRIu64 " + %" PRIu64 "\n", __func__, i,
>
> I guess you want PRIx64 in both places here.
>
> I'd put the '%' on the next line:
>
>            DPRINT("%s: region %d: Registered userfault for "
>                   "%" PRIx64 " + %" PRIx64 "\n", __func__, i,
>
> Using PRIx64:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

indeed, thanks
Gerd, can you change it on commit?

-- 
Marc-André Lureau


  reply	other threads:[~2019-05-14 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 10:41 [Qemu-devel] [PATCH v4 0/3] Add vhost-user-input Marc-André Lureau
2019-05-14 10:41 ` [Qemu-devel] [PATCH v4 1/3] libvhost-user: fix cast warnings on 32 bits Marc-André Lureau
2019-05-14 11:50   ` Philippe Mathieu-Daudé
2019-05-14 10:41 ` [Qemu-devel] [PATCH v4 2/3] libvhost-user: fix -Werror=format= on ppc64 Marc-André Lureau
2019-05-14 11:53   ` Philippe Mathieu-Daudé
2019-05-14 12:33     ` Marc-André Lureau [this message]
2019-05-22  5:23       ` Gerd Hoffmann
2019-05-22 13:06         ` Marc-André Lureau
2019-05-14 10:41 ` [Qemu-devel] [PATCH v4 3/3] contrib: add vhost-user-input Marc-André Lureau

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=CAJ+F1CL3KJpE_+XCXUMyffuCPwUOaqZCzHpxqv2q_BKdQVF_4w@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.