qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Stefan Weil <sw@weilnetz.de>,
	qemu-devel@nongnu.org, Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [PATCH-for-5.1? v2] qapi/error: Check format string argument in error_*prepend()
Date: Fri, 24 Jul 2020 11:33:29 +0200	[thread overview]
Message-ID: <129317f1-a6fb-7eae-adbd-5b061dfddd74@redhat.com> (raw)
In-Reply-To: <87o8o5cpbp.fsf@dusky.pond.sub.org>

On 7/24/20 10:03 AM, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> error_propagate_prepend() "behaves like error_prepend()", and
>> error_prepend() uses "formatting @fmt, ... like printf()".
>> error_prepend() checks its format string argument, but
>> error_propagate_prepend() does not. Fix by addint the format
> 
> s/addint/adding/
> 
>> attribute to error_propagate_prepend() and error_vprepend().
>>
>> This would have caught the bug fixed in the previous commit:
>>
>>     CC      hw/sd/milkymist-memcard.o
>>   hw/sd/milkymist-memcard.c: In function ‘milkymist_memcard_realize’:
>>   hw/sd/milkymist-memcard.c:284:70: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
>>     284 |         error_propagate_prepend(errp, err, "failed to init SD card: %s");
>>         |                                                                     ~^
>>         |                                                                      |
>>         |                                                                      char *
> 
> I see no need to repeat the details here.  If you agree, I'll drop them
> in my tree.

OK, thanks.

> 
>> Missed in commit 4b5766488f "error: Fix use of error_prepend() with
>> &error_fatal, &error_abort".
>>
>> Inspired-by: Stefan Weil <sw@weilnetz.de>
>> Suggested-by: Eric Blake <eblake@redhat.com>
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> 



  reply	other threads:[~2020-07-24  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 17:12 [PATCH-for-5.1? v2] qapi/error: Check format string argument in error_*prepend() Philippe Mathieu-Daudé
2020-07-24  8:03 ` Markus Armbruster
2020-07-24  9:33   ` Philippe Mathieu-Daudé [this message]
2020-07-24 11:44 ` Markus Armbruster

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=129317f1-a6fb-7eae-adbd-5b061dfddd74@redhat.com \
    --to=philmd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@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).