qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>
To: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM)
Date: Thu, 24 Feb 2022 23:26:40 +0100	[thread overview]
Message-ID: <c34a05c2-e2aa-81b6-dd64-a9f921cc6f8b@gmail.com> (raw)
In-Reply-To: <44e29af1-6d6b-5613-d4c3-aec1f133e931@weilnetz.de>

On 24/2/22 22:22, Stefan Weil wrote:
> Am 07.01.22 um 16:49 schrieb Stefan Weil:
> 
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>>
>> LGTM has some more alerts which need attention:
>> https://lgtm.com/projects/g/qemu/qemu/
>>
>> Regards,
>> Stefan
>>
>>   subprojects/libvhost-user/libvhost-user.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/subprojects/libvhost-user/libvhost-user.c 
>> b/subprojects/libvhost-user/libvhost-user.c
>> index 787f4d2d4f..6eb72c4200 100644
>> --- a/subprojects/libvhost-user/libvhost-user.c
>> +++ b/subprojects/libvhost-user/libvhost-user.c
>> @@ -651,7 +651,7 @@ generate_faults(VuDev *dev) {
>>           if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, &reg_struct)) {
>>               vu_panic(dev, "%s: Failed to userfault region %d "
>> -                          "@%p + size:%zx offset: %zx: (ufd=%d)%s\n",
>> +                          "@%" PRIx64 " + size:%zx offset: %zx: 
>> (ufd=%d)%s\n",
>>                        __func__, i,
>>                        dev_region->mmap_addr,
>>                        dev_region->size, dev_region->mmap_offset,
> 
> 
> Up to now I did not see any response to this patch, and it is also still 
> missing in the latest code.
> 
> dev_region->mmap_addr is an uint64_t value, so the current format string 
> "%p" won't work on any platform where pointers are not 64 bit value.
> 
> Stefan
> 
> 
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



      reply	other threads:[~2022-02-24 22:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 15:49 [PATCH] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Stefan Weil
2022-02-24 21:22 ` Stefan Weil
2022-02-24 22:26   ` Philippe Mathieu-Daudé [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=c34a05c2-e2aa-81b6-dd64-a9f921cc6f8b@gmail.com \
    --to=philippe.mathieu.daude@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).