qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] libvhost-user: fix -Werror=format= warnings with __u64 fields
Date: Thu, 29 Jul 2021 10:05:57 +0200	[thread overview]
Message-ID: <9ee74a1c-7ddd-ebed-f2e3-e23220b04a9d@redhat.com> (raw)
In-Reply-To: <YJK72YzBwoLyTyK5@stefanha-x1.localdomain>

On 05/05/21 17:38, Stefan Hajnoczi wrote:
> On Wed, May 05, 2021 at 07:13:13PM +0400, marcandre.lureau@redhat.com wrote:
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> ../subprojects/libvhost-user/libvhost-user.c:1070:12: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u64’ {aka ‘long long unsigned int’} [-Werror=format=]
>>   1070 |     DPRINT("    desc_user_addr:   0x%016" PRIx64 "\n", vra->desc_user_addr);
>>        |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ~~~~~~~~~~~~~~~~~~~
>>        |                                                           |
>>        |                                                           __u64 {aka long long unsigned int}
>>
>> Rather than using %llx, which may fail if __u64 is declared differently
>> elsewhere, let's just cast the values. Feel free to propose a better solution!
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>   subprojects/libvhost-user/libvhost-user.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> Looks good to me:
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 

Queued both, thanks.

Paolo



      reply	other threads:[~2021-07-29  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 15:13 [PATCH 1/2] meson: fix meson 0.58 warning with libvhost-user subproject marcandre.lureau
2021-05-05 15:13 ` [PATCH 2/2] libvhost-user: fix -Werror=format= warnings with __u64 fields marcandre.lureau
2021-05-05 15:38   ` Stefan Hajnoczi
2021-07-29  8:05     ` Paolo Bonzini [this message]

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=9ee74a1c-7ddd-ebed-f2e3-e23220b04a9d@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 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).